Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f6f3a488
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看板
提交
f6f3a488
编写于
5月 25, 2005
作者:
提交者:
Jeff Garzik
5月 25, 2005
浏览文件
操作
浏览文件
下载
差异文件
Automatic merge of /spare/repo/netdev-2.6 branch amd8111
上级
a58eae64
dfa1b73f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
10 deletion
+14
-10
drivers/net/amd8111e.c
drivers/net/amd8111e.c
+14
-10
未找到文件。
drivers/net/amd8111e.c
浏览文件 @
f6f3a488
...
...
@@ -738,6 +738,7 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
short
vtag
;
#endif
int
rx_pkt_limit
=
dev
->
quota
;
unsigned
long
flags
;
do
{
/* process receive packets until we use the quota*/
...
...
@@ -841,18 +842,19 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
/* Receive descriptor is empty now */
dev
->
quota
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
netif_rx_complete
(
dev
);
/* enable receive interrupt */
writel
(
VAL0
|
RINTEN0
,
mmio
+
INTEN0
);
writel
(
VAL2
|
RDMD0
,
mmio
+
CMD0
);
spin_unlock_irqrestore
(
&
lp
->
lock
,
flags
);
return
0
;
rx_not_empty:
/* Do not call a netif_rx_complete */
dev
->
quota
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
return
1
;
}
#else
...
...
@@ -1261,18 +1263,20 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
amd8111e_priv
*
lp
=
netdev_priv
(
dev
);
void
__iomem
*
mmio
=
lp
->
mmio
;
unsigned
int
intr0
;
unsigned
int
intr0
,
intren0
;
unsigned
int
handled
=
1
;
if
(
dev
==
NULL
)
if
(
unlikely
(
dev
==
NULL
)
)
return
IRQ_NONE
;
if
(
regs
)
spin_lock
(
&
lp
->
lock
);
spin_lock
(
&
lp
->
lock
);
/* disabling interrupt */
writel
(
INTREN
,
mmio
+
CMD0
);
/* Read interrupt status */
intr0
=
readl
(
mmio
+
INT0
);
intren0
=
readl
(
mmio
+
INTEN0
);
/* Process all the INT event until INTR bit is clear. */
...
...
@@ -1293,11 +1297,11 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
/* Schedule a polling routine */
__netif_rx_schedule
(
dev
);
}
else
{
else
if
(
intren0
&
RINTEN0
)
{
printk
(
"************Driver bug! \
interrupt while in poll
\n
"
);
/* Fix by disabl
ing
interrupts */
writel
(
RINT
0
,
mmio
+
INT
0
);
/* Fix by disabl
e receive
interrupts */
writel
(
RINT
EN0
,
mmio
+
INTEN
0
);
}
}
#else
...
...
@@ -1321,7 +1325,7 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
err_no_interrupt:
writel
(
VAL0
|
INTREN
,
mmio
+
CMD0
);
if
(
regs
)
spin_unlock
(
&
lp
->
lock
);
spin_unlock
(
&
lp
->
lock
);
return
IRQ_RETVAL
(
handled
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录