Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ceade961
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看板
提交
ceade961
编写于
9月 21, 2008
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
atm: idt77252: Use generic SKB queue management instead of home-grown scheme.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
43f59c89
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
26 deletion
+10
-26
drivers/atm/idt77252.c
drivers/atm/idt77252.c
+9
-23
drivers/atm/idt77252.h
drivers/atm/idt77252.h
+1
-3
未找到文件。
drivers/atm/idt77252.c
浏览文件 @
ceade961
...
...
@@ -1114,11 +1114,8 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
rpp
=
&
vc
->
rcv
.
rx_pool
;
__skb_queue_tail
(
&
rpp
->
queue
,
skb
);
rpp
->
len
+=
skb
->
len
;
if
(
!
rpp
->
count
++
)
rpp
->
first
=
skb
;
*
rpp
->
last
=
skb
;
rpp
->
last
=
&
skb
->
next
;
if
(
stat
&
SAR_RSQE_EPDU
)
{
unsigned
char
*
l1l2
;
...
...
@@ -1145,7 +1142,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
atomic_inc
(
&
vcc
->
stats
->
rx_err
);
return
;
}
if
(
rpp
->
count
>
1
)
{
if
(
skb_queue_len
(
&
rpp
->
queue
)
>
1
)
{
struct
sk_buff
*
sb
;
skb
=
dev_alloc_skb
(
rpp
->
len
);
...
...
@@ -1161,12 +1158,9 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
dev_kfree_skb
(
skb
);
return
;
}
sb
=
rpp
->
first
;
for
(
i
=
0
;
i
<
rpp
->
count
;
i
++
)
{
skb_queue_walk
(
&
rpp
->
queue
,
sb
)
memcpy
(
skb_put
(
skb
,
sb
->
len
),
sb
->
data
,
sb
->
len
);
sb
=
sb
->
next
;
}
recycle_rx_pool_skb
(
card
,
rpp
);
...
...
@@ -1180,7 +1174,6 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
return
;
}
skb
->
next
=
NULL
;
flush_rx_pool
(
card
,
rpp
);
if
(
!
atm_charge
(
vcc
,
skb
->
truesize
))
{
...
...
@@ -1918,25 +1911,18 @@ recycle_rx_skb(struct idt77252_dev *card, struct sk_buff *skb)
static
void
flush_rx_pool
(
struct
idt77252_dev
*
card
,
struct
rx_pool
*
rpp
)
{
skb_queue_head_init
(
&
rpp
->
queue
);
rpp
->
len
=
0
;
rpp
->
count
=
0
;
rpp
->
first
=
NULL
;
rpp
->
last
=
&
rpp
->
first
;
}
static
void
recycle_rx_pool_skb
(
struct
idt77252_dev
*
card
,
struct
rx_pool
*
rpp
)
{
struct
sk_buff
*
skb
,
*
next
;
int
i
;
struct
sk_buff
*
skb
,
*
tmp
;
skb
=
rpp
->
first
;
for
(
i
=
0
;
i
<
rpp
->
count
;
i
++
)
{
next
=
skb
->
next
;
skb
->
next
=
NULL
;
skb_queue_walk_safe
(
&
rpp
->
queue
,
skb
,
tmp
)
recycle_rx_skb
(
card
,
skb
);
skb
=
next
;
}
flush_rx_pool
(
card
,
rpp
);
}
...
...
@@ -2537,7 +2523,7 @@ idt77252_close(struct atm_vcc *vcc)
waitfor_idle
(
card
);
spin_unlock_irqrestore
(
&
card
->
cmd_lock
,
flags
);
if
(
vc
->
rcv
.
rx_pool
.
count
)
{
if
(
skb_queue_len
(
&
vc
->
rcv
.
rx_pool
.
queue
)
!=
0
)
{
DPRINTK
(
"%s: closing a VC with pending rx buffers.
\n
"
,
card
->
name
);
...
...
@@ -2970,7 +2956,7 @@ close_card_oam(struct idt77252_dev *card)
waitfor_idle
(
card
);
spin_unlock_irqrestore
(
&
card
->
cmd_lock
,
flags
);
if
(
vc
->
rcv
.
rx_pool
.
count
)
{
if
(
skb_queue_len
(
&
vc
->
rcv
.
rx_pool
.
queue
)
!=
0
)
{
DPRINTK
(
"%s: closing a VC "
"with pending rx buffers.
\n
"
,
card
->
name
);
...
...
drivers/atm/idt77252.h
浏览文件 @
ceade961
...
...
@@ -173,10 +173,8 @@ struct scq_info
};
struct
rx_pool
{
struct
sk_buff
*
first
;
struct
sk_buff
**
last
;
struct
sk_buff_head
queue
;
unsigned
int
len
;
unsigned
int
count
;
};
struct
aal1
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录