Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
85ac6162
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看板
提交
85ac6162
编写于
2月 20, 2011
作者:
M
Marc Kleine-Budde
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ax88796: use netdev_<LEVEL> instead of dev_<LEVEL> and pr_<LEVEL>
Signed-off-by:
N
Marc Kleine-Budde
<
mkl@pengutronix.de
>
上级
1cbece33
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
26 deletion
+20
-26
drivers/net/ax88796.c
drivers/net/ax88796.c
+20
-26
未找到文件。
drivers/net/ax88796.c
浏览文件 @
85ac6162
...
...
@@ -143,12 +143,11 @@ static int ax_initial_check(struct net_device *dev)
static
void
ax_reset_8390
(
struct
net_device
*
dev
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
unsigned
long
reset_start_time
=
jiffies
;
void
__iomem
*
addr
=
(
void
__iomem
*
)
dev
->
base_addr
;
if
(
ei_debug
>
1
)
dev_dbg
(
&
ax
->
dev
->
dev
,
"resetting the 8390 t=%ld
\n
"
,
jiffies
);
netdev_dbg
(
dev
,
"resetting the 8390 t=%ld
\n
"
,
jiffies
);
ei_outb
(
ei_inb
(
addr
+
NE_RESET
),
addr
+
NE_RESET
);
...
...
@@ -158,8 +157,7 @@ static void ax_reset_8390(struct net_device *dev)
/* This check _should_not_ be necessary, omit eventually. */
while
((
ei_inb
(
addr
+
EN0_ISR
)
&
ENISR_RESET
)
==
0
)
{
if
(
jiffies
-
reset_start_time
>
2
*
HZ
/
100
)
{
dev_warn
(
&
ax
->
dev
->
dev
,
"%s: %s did not complete.
\n
"
,
__func__
,
dev
->
name
);
netdev_warn
(
dev
,
"%s: did not complete.
\n
"
,
__func__
);
break
;
}
}
...
...
@@ -172,14 +170,13 @@ static void ax_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int
ring_page
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
void
__iomem
*
nic_base
=
ei_local
->
mem
;
/* This *shouldn't* happen. If it does, it's the last thing you'll see */
if
(
ei_local
->
dmaing
)
{
dev_err
(
&
ax
->
dev
->
dev
,
"%s:
DMAing conflict in %s "
netdev_err
(
dev
,
"
DMAing conflict in %s "
"[DMAstat:%d][irqlock:%d].
\n
"
,
dev
->
name
,
__func__
,
__func__
,
ei_local
->
dmaing
,
ei_local
->
irqlock
);
return
;
}
...
...
@@ -217,15 +214,14 @@ static void ax_block_input(struct net_device *dev, int count,
struct
sk_buff
*
skb
,
int
ring_offset
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
void
__iomem
*
nic_base
=
ei_local
->
mem
;
char
*
buf
=
skb
->
data
;
if
(
ei_local
->
dmaing
)
{
dev_err
(
&
ax
->
dev
->
dev
,
"
%s:
DMAing conflict in %s "
netdev_err
(
dev
,
"DMAing conflict in %s "
"[DMAstat:%d][irqlock:%d].
\n
"
,
dev
->
name
,
__func__
,
__func__
,
ei_local
->
dmaing
,
ei_local
->
irqlock
);
return
;
}
...
...
@@ -255,7 +251,6 @@ static void ax_block_output(struct net_device *dev, int count,
const
unsigned
char
*
buf
,
const
int
start_page
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
void
__iomem
*
nic_base
=
ei_local
->
mem
;
unsigned
long
dma_start
;
...
...
@@ -269,9 +264,9 @@ static void ax_block_output(struct net_device *dev, int count,
/* This *shouldn't* happen. If it does, it's the last thing you'll see */
if
(
ei_local
->
dmaing
)
{
dev_err
(
&
ax
->
dev
->
dev
,
"%s:
DMAing conflict in %s."
netdev_err
(
dev
,
"
DMAing conflict in %s."
"[DMAstat:%d][irqlock:%d]
\n
"
,
dev
->
name
,
__func__
,
__func__
,
ei_local
->
dmaing
,
ei_local
->
irqlock
);
return
;
}
...
...
@@ -298,8 +293,7 @@ static void ax_block_output(struct net_device *dev, int count,
while
((
ei_inb
(
nic_base
+
EN0_ISR
)
&
ENISR_RDC
)
==
0
)
{
if
(
jiffies
-
dma_start
>
2
*
HZ
/
100
)
{
/* 20ms */
dev_warn
(
&
ax
->
dev
->
dev
,
"%s: timeout waiting for Tx RDC.
\n
"
,
dev
->
name
);
netdev_warn
(
dev
,
"timeout waiting for Tx RDC.
\n
"
);
ax_reset_8390
(
dev
);
ax_NS8390_init
(
dev
,
1
);
break
;
...
...
@@ -404,7 +398,7 @@ static void
ax_phy_issueaddr
(
struct
net_device
*
dev
,
int
phy_addr
,
int
reg
,
int
opc
)
{
if
(
phy_debug
)
pr_debug
(
"%s: dev %p, %04x, %04x, %d
\n
"
,
netdev_dbg
(
dev
,
"%s: dev %p, %04x, %04x, %d
\n
"
,
__func__
,
dev
,
phy_addr
,
reg
,
opc
);
ax_mii_ei_outbits
(
dev
,
0x3f
,
6
);
/* pre-amble */
...
...
@@ -431,7 +425,7 @@ ax_phy_read(struct net_device *dev, int phy_addr, int reg)
spin_unlock_irqrestore
(
&
ei_local
->
page_lock
,
flags
);
if
(
phy_debug
)
pr_debug
(
"%s: %04x.%04x => read %04x
\n
"
,
__func__
,
netdev_dbg
(
dev
,
"%s: %04x.%04x => read %04x
\n
"
,
__func__
,
phy_addr
,
reg
,
result
);
return
result
;
...
...
@@ -441,10 +435,9 @@ static void
ax_phy_write
(
struct
net_device
*
dev
,
int
phy_addr
,
int
reg
,
int
value
)
{
struct
ei_device
*
ei
=
netdev_priv
(
dev
);
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
unsigned
long
flags
;
dev_dbg
(
&
ax
->
dev
->
dev
,
"%s: %p, %04x, %04x %04x
\n
"
,
netdev_dbg
(
dev
,
"%s: %p, %04x, %04x %04x
\n
"
,
__func__
,
dev
,
phy_addr
,
reg
,
value
);
spin_lock_irqsave
(
&
ei
->
page_lock
,
flags
);
...
...
@@ -478,7 +471,7 @@ static int ax_open(struct net_device *dev)
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
int
ret
;
dev_dbg
(
&
ax
->
dev
->
dev
,
"%s: open
\n
"
,
dev
->
name
);
netdev_dbg
(
dev
,
"open
\n
"
);
ret
=
request_irq
(
dev
->
irq
,
ax_ei_interrupt
,
ax
->
irqflags
,
dev
->
name
,
dev
);
...
...
@@ -514,7 +507,7 @@ static int ax_close(struct net_device *dev)
struct
ax_device
*
ax
=
to_ax_dev
(
dev
);
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
dev_dbg
(
&
ax
->
dev
->
dev
,
"%s: close
\n
"
,
dev
->
name
);
netdev_dbg
(
dev
,
"close
\n
"
);
/* turn the phy off */
...
...
@@ -785,14 +778,14 @@ static int ax_init_dev(struct net_device *dev)
ax_NS8390_init
(
dev
,
0
);
dev_info
(
&
ax
->
dev
->
dev
,
"%dbit, irq %d, %lx, MAC: %pM
\n
"
,
ei_local
->
word16
?
16
:
8
,
dev
->
irq
,
dev
->
base_addr
,
dev
->
dev_addr
);
ret
=
register_netdev
(
dev
);
if
(
ret
)
goto
out_irq
;
netdev_info
(
dev
,
"%dbit, irq %d, %lx, MAC: %pM
\n
"
,
ei_local
->
word16
?
16
:
8
,
dev
->
irq
,
dev
->
base_addr
,
dev
->
dev_addr
);
return
0
;
out_irq:
...
...
@@ -849,6 +842,7 @@ static int ax_probe(struct platform_device *pdev)
return
-
ENOMEM
;
/* ok, let's setup our device */
SET_NETDEV_DEV
(
dev
,
&
pdev
->
dev
);
ei_local
=
netdev_priv
(
dev
);
ax
=
to_ax_dev
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录