Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2aad7c8e
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2aad7c8e
编写于
9月 23, 2008
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
de4x5: Use skb_queue_head instead of by-hand implementation.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
ebf05982
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
30 deletion
+8
-30
drivers/net/tulip/de4x5.c
drivers/net/tulip/de4x5.c
+8
-30
未找到文件。
drivers/net/tulip/de4x5.c
浏览文件 @
2aad7c8e
...
...
@@ -832,7 +832,7 @@ struct de4x5_private {
s32
csr14
;
/* Saved SIA TX/RX Register */
s32
csr15
;
/* Saved SIA General Register */
int
save_cnt
;
/* Flag if state already saved */
struct
sk_buff
*
skb
;
/* Save the (re-ordered) skb's */
struct
sk_buff
_head
queue
;
/* Save the (re-ordered) skb's */
}
cache
;
struct
de4x5_srom
srom
;
/* A copy of the SROM */
int
cfrv
;
/* Card CFRV copy */
...
...
@@ -1128,6 +1128,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
printk
(
" which has an Ethernet PROM CRC error.
\n
"
);
return
-
ENXIO
;
}
else
{
skb_queue_head_init
(
&
lp
->
cache
.
queue
);
lp
->
cache
.
gepc
=
GEP_INIT
;
lp
->
asBit
=
GEP_SLNK
;
lp
->
asPolarity
=
GEP_SLNK
;
...
...
@@ -1487,7 +1488,7 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
}
}
else
if
(
skb
->
len
>
0
)
{
/* If we already have stuff queued locally, use that first */
if
(
lp
->
cache
.
skb
&&
!
lp
->
interrupt
)
{
if
(
!
skb_queue_empty
(
&
lp
->
cache
.
queue
)
&&
!
lp
->
interrupt
)
{
de4x5_put_cache
(
dev
,
skb
);
skb
=
de4x5_get_cache
(
dev
);
}
...
...
@@ -1580,7 +1581,7 @@ de4x5_interrupt(int irq, void *dev_id)
/* Load the TX ring with any locally stored packets */
if
(
!
test_and_set_bit
(
0
,
(
void
*
)
&
lp
->
cache
.
lock
))
{
while
(
lp
->
cache
.
skb
&&
!
netif_queue_stopped
(
dev
)
&&
lp
->
tx_enable
)
{
while
(
!
skb_queue_empty
(
&
lp
->
cache
.
queue
)
&&
!
netif_queue_stopped
(
dev
)
&&
lp
->
tx_enable
)
{
de4x5_queue_pkt
(
de4x5_get_cache
(
dev
),
dev
);
}
lp
->
cache
.
lock
=
0
;
...
...
@@ -3679,11 +3680,7 @@ de4x5_free_tx_buffs(struct net_device *dev)
}
/* Unload the locally queued packets */
while
(
lp
->
cache
.
skb
)
{
dev_kfree_skb
(
de4x5_get_cache
(
dev
));
}
return
;
__skb_queue_purge
(
&
lp
->
cache
.
queue
);
}
/*
...
...
@@ -3781,43 +3778,24 @@ static void
de4x5_put_cache
(
struct
net_device
*
dev
,
struct
sk_buff
*
skb
)
{
struct
de4x5_private
*
lp
=
netdev_priv
(
dev
);
struct
sk_buff
*
p
;
if
(
lp
->
cache
.
skb
)
{
for
(
p
=
lp
->
cache
.
skb
;
p
->
next
;
p
=
p
->
next
);
p
->
next
=
skb
;
}
else
{
lp
->
cache
.
skb
=
skb
;
}
skb
->
next
=
NULL
;
return
;
__skb_queue_tail
(
&
lp
->
cache
.
queue
,
skb
)
;
}
static
void
de4x5_putb_cache
(
struct
net_device
*
dev
,
struct
sk_buff
*
skb
)
{
struct
de4x5_private
*
lp
=
netdev_priv
(
dev
);
struct
sk_buff
*
p
=
lp
->
cache
.
skb
;
lp
->
cache
.
skb
=
skb
;
skb
->
next
=
p
;
return
;
__skb_queue_head
(
&
lp
->
cache
.
queue
,
skb
)
;
}
static
struct
sk_buff
*
de4x5_get_cache
(
struct
net_device
*
dev
)
{
struct
de4x5_private
*
lp
=
netdev_priv
(
dev
);
struct
sk_buff
*
p
=
lp
->
cache
.
skb
;
if
(
p
)
{
lp
->
cache
.
skb
=
p
->
next
;
p
->
next
=
NULL
;
}
return
p
;
return
__skb_dequeue
(
&
lp
->
cache
.
queue
);
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录