Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f69e4170
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
f69e4170
编写于
1月 29, 2009
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
solos: Tidy up tx_mask handling for ports which need TX
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
eaf83e39
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
7 deletion
+13
-7
drivers/atm/solos-pci.c
drivers/atm/solos-pci.c
+13
-7
未找到文件。
drivers/atm/solos-pci.c
浏览文件 @
f69e4170
...
...
@@ -100,6 +100,7 @@ struct solos_card {
void
__iomem
*
config_regs
;
void
__iomem
*
buffers
;
int
nr_ports
;
int
tx_mask
;
struct
pci_dev
*
dev
;
struct
atm_dev
*
atmdev
[
4
];
struct
tasklet_struct
tlet
;
...
...
@@ -590,15 +591,13 @@ void solos_bh(unsigned long card_arg)
struct
solos_card
*
card
=
(
void
*
)
card_arg
;
int
port
;
uint32_t
card_flags
;
uint32_t
tx_mask
;
uint32_t
rx_done
=
0
;
card_flags
=
ioread32
(
card
->
config_regs
+
FLAGS_ADDR
);
/* The TX bits are set if the channel is busy; clear if not. We want to
invoke fpga_tx() unless _all_ the bits for active channels are set */
tx_mask
=
(
1
<<
card
->
nr_ports
)
-
1
;
if
((
card_flags
&
tx_mask
)
!=
tx_mask
)
if
((
card_flags
&
card
->
tx_mask
)
!=
card
->
tx_mask
)
fpga_tx
(
card
);
for
(
port
=
0
;
port
<
card
->
nr_ports
;
port
++
)
{
...
...
@@ -887,15 +886,20 @@ static void fpga_queue(struct solos_card *card, int port, struct sk_buff *skb,
struct
atm_vcc
*
vcc
)
{
int
old_len
;
unsigned
long
flags
;
SKB_CB
(
skb
)
->
vcc
=
vcc
;
spin_lock
(
&
card
->
tx_queue_lock
);
spin_lock
_irqsave
(
&
card
->
tx_queue_lock
,
flags
);
old_len
=
skb_queue_len
(
&
card
->
tx_queue
[
port
]);
skb_queue_tail
(
&
card
->
tx_queue
[
port
],
skb
);
spin_unlock
(
&
card
->
tx_queue_lock
);
if
(
!
old_len
)
{
card
->
tx_mask
|=
(
1
<<
port
);
}
spin_unlock_irqrestore
(
&
card
->
tx_queue_lock
,
flags
);
/* If TX might need to be started, do so */
/* Theoretically we could just schedule the tasklet here, but
that introduces latency we don't want -- it's noticeable */
if
(
!
old_len
)
fpga_tx
(
card
);
}
...
...
@@ -911,7 +915,7 @@ static int fpga_tx(struct solos_card *card)
spin_lock_irqsave
(
&
card
->
tx_lock
,
flags
);
tx_pending
=
ioread32
(
card
->
config_regs
+
FLAGS_ADDR
);
tx_pending
=
ioread32
(
card
->
config_regs
+
FLAGS_ADDR
)
&
card
->
tx_mask
;
dev_vdbg
(
&
card
->
dev
->
dev
,
"TX Flags are %X
\n
"
,
tx_pending
);
...
...
@@ -925,6 +929,8 @@ static int fpga_tx(struct solos_card *card)
spin_lock
(
&
card
->
tx_queue_lock
);
skb
=
skb_dequeue
(
&
card
->
tx_queue
[
port
]);
if
(
!
skb
)
card
->
tx_mask
&=
~
(
1
<<
port
);
spin_unlock
(
&
card
->
tx_queue_lock
);
if
(
skb
&&
!
card
->
using_dma
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录