Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
bdc54625
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bdc54625
编写于
1月 29, 2009
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
solos: Remove debugging, commented-out test code
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
35c2221b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
49 deletion
+3
-49
drivers/atm/solos-pci.c
drivers/atm/solos-pci.c
+3
-49
未找到文件。
drivers/atm/solos-pci.c
浏览文件 @
bdc54625
...
...
@@ -813,8 +813,7 @@ static int popen(struct atm_vcc *vcc)
fpga_queue
(
card
,
SOLOS_CHAN
(
vcc
->
dev
),
skb
,
NULL
);
// dev_dbg(&card->dev->dev, "Open for vpi %d and vci %d on interface %d\n", vcc->vpi, vcc->vci, SOLOS_CHAN(vcc->dev));
set_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
// accept the vpi / vci
set_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
set_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
list_vccs
(
0
);
...
...
@@ -842,8 +841,6 @@ static void pclose(struct atm_vcc *vcc)
fpga_queue
(
card
,
SOLOS_CHAN
(
vcc
->
dev
),
skb
,
NULL
);
// dev_dbg(&card->dev->dev, "Close for vpi %d and vci %d on interface %d\n", vcc->vpi, vcc->vci, SOLOS_CHAN(vcc->dev));
clear_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
...
...
@@ -936,7 +933,7 @@ static uint32_t fpga_tx(struct solos_card *card)
if
(
skb
&&
!
card
->
using_dma
)
{
memcpy_toio
(
TX_BUF
(
card
,
port
),
skb
->
data
,
skb
->
len
);
tx_started
|=
1
<<
port
;
//Set TX full flag
tx_started
|=
1
<<
port
;
oldskb
=
skb
;
/* We're done with this skb already */
}
else
if
(
skb
&&
card
->
using_dma
)
{
SKB_CB
(
skb
)
->
dma_addr
=
pci_map_single
(
card
->
dev
,
skb
->
data
,
...
...
@@ -965,10 +962,10 @@ static uint32_t fpga_tx(struct solos_card *card)
}
}
/* For non-DMA TX, write the 'TX start' bit for all four ports simultaneously */
if
(
tx_started
)
iowrite32
(
tx_started
,
card
->
config_regs
+
FLAGS_ADDR
);
out:
spin_unlock_irqrestore
(
&
card
->
tx_lock
,
flags
);
return
card_flags
;
}
...
...
@@ -979,9 +976,6 @@ static int psend(struct atm_vcc *vcc, struct sk_buff *skb)
struct
pkt_hdr
*
header
;
int
pktlen
;
//dev_dbg(&card->dev->dev, "psend called.\n");
//dev_dbg(&card->dev->dev, "dev,vpi,vci = %d,%d,%d\n",SOLOS_CHAN(vcc->dev),vcc->vpi,vcc->vci);
pktlen
=
skb
->
len
;
if
(
pktlen
>
(
BUF_SIZE
-
sizeof
(
*
header
)))
{
dev_warn
(
&
card
->
dev
->
dev
,
"Length of PDU is too large. Dropping PDU.
\n
"
);
...
...
@@ -1077,11 +1071,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto
out_unmap_config
;
}
// for(i=0;i<64 ;i+=4){
// data32=ioread32(card->buffers + i);
// dev_dbg(&card->dev->dev, "%08lX\n",(unsigned long)data32);
// }
//Fill Config Mem with zeros
for
(
i
=
0
;
i
<
128
;
i
+=
4
)
iowrite32
(
0
,
card
->
config_regs
+
i
);
...
...
@@ -1110,33 +1099,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
spin_lock_init
(
&
card
->
param_queue_lock
);
INIT_LIST_HEAD
(
&
card
->
param_queue
);
/*
// Set Loopback mode
data32 = 0x00010000;
iowrite32(data32,card->config_regs + FLAGS_ADDR);
*/
/*
// Fill Buffers with zeros
for (i = 0; i < BUF_SIZE * 8; i += 4)
iowrite32(0, card->buffers + i);
*/
/*
for(i = 0; i < (BUF_SIZE * 1); i += 4)
iowrite32(0x12345678, card->buffers + i + (0*BUF_SIZE));
for(i = 0; i < (BUF_SIZE * 1); i += 4)
iowrite32(0xabcdef98, card->buffers + i + (1*BUF_SIZE));
// Read Config Memory
printk(KERN_DEBUG "Reading Config MEM\n");
i = 0;
for(i = 0; i < 16; i++) {
data32=ioread32(card->buffers + i*(BUF_SIZE/2));
printk(KERN_ALERT "Addr: %lX Data: %08lX\n",
(unsigned long)(addr_start + i*(BUF_SIZE/2)),
(unsigned long)data32);
}
*/
//dev_dbg(&card->dev->dev, "Requesting IRQ: %d\n",dev->irq);
err
=
request_irq
(
dev
->
irq
,
solos_irq
,
IRQF_SHARED
,
"solos-pci"
,
card
);
if
(
err
)
{
...
...
@@ -1144,7 +1106,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto
out_unmap_both
;
}
// Enable IRQs
iowrite32
(
1
,
card
->
config_regs
+
IRQ_EN_ADDR
);
if
(
fpga_upgrade
)
...
...
@@ -1243,25 +1204,18 @@ static void fpga_remove(struct pci_dev *dev)
atm_remove
(
card
);
dev_vdbg
(
&
dev
->
dev
,
"Freeing IRQ
\n
"
);
// Disable IRQs from FPGA
iowrite32
(
0
,
card
->
config_regs
+
IRQ_EN_ADDR
);
free_irq
(
dev
->
irq
,
card
);
tasklet_kill
(
&
card
->
tlet
);
// iowrite32(0x01,pciregs);
dev_vdbg
(
&
dev
->
dev
,
"Unmapping PCI resource
\n
"
);
pci_iounmap
(
dev
,
card
->
buffers
);
pci_iounmap
(
dev
,
card
->
config_regs
);
dev_vdbg
(
&
dev
->
dev
,
"Releasing PCI Region
\n
"
);
pci_release_regions
(
dev
);
pci_disable_device
(
dev
);
pci_set_drvdata
(
dev
,
NULL
);
kfree
(
card
);
// dev_dbg(&card->dev->dev, "fpga_remove\n");
return
;
}
static
struct
pci_device_id
fpga_pci_tbl
[]
__devinitdata
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录