Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
7d17c1d6
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7d17c1d6
编写于
5月 12, 2005
作者:
提交者:
Jeff Garzik
5月 12, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[netdrvrs] Use netif_carrier_* instead of IFF_RUNNING
上级
88d7bd8c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
13 addition
and
32 deletion
+13
-32
drivers/net/au1000_eth.c
drivers/net/au1000_eth.c
+2
-8
drivers/net/bmac.c
drivers/net/bmac.c
+0
-2
drivers/net/sk98lin/skge.c
drivers/net/sk98lin/skge.c
+3
-5
drivers/net/tlan.c
drivers/net/tlan.c
+2
-2
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/ibmtr.c
+3
-8
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/lmc/lmc_main.c
+2
-6
include/linux/if.h
include/linux/if.h
+1
-1
未找到文件。
drivers/net/au1000_eth.c
浏览文件 @
7d17c1d6
...
...
@@ -1681,10 +1681,6 @@ static int au1000_init(struct net_device *dev)
control
|=
MAC_FULL_DUPLEX
;
}
/* fix for startup without cable */
if
(
!
link
)
dev
->
flags
&=
~
IFF_RUNNING
;
aup
->
mac
->
control
=
control
;
aup
->
mac
->
vlan1_tag
=
0x8100
;
/* activate vlan support */
au_sync
();
...
...
@@ -1709,16 +1705,14 @@ static void au1000_timer(unsigned long data)
if_port
=
dev
->
if_port
;
if
(
aup
->
phy_ops
->
phy_status
(
dev
,
aup
->
phy_addr
,
&
link
,
&
speed
)
==
0
)
{
if
(
link
)
{
if
(
!
(
dev
->
flags
&
IFF_RUNNING
))
{
if
(
!
netif_carrier_ok
(
dev
))
{
netif_carrier_on
(
dev
);
dev
->
flags
|=
IFF_RUNNING
;
printk
(
KERN_INFO
"%s: link up
\n
"
,
dev
->
name
);
}
}
else
{
if
(
dev
->
flags
&
IFF_RUNNING
)
{
if
(
netif_carrier_ok
(
dev
)
)
{
netif_carrier_off
(
dev
);
dev
->
flags
&=
~
IFF_RUNNING
;
dev
->
if_port
=
0
;
printk
(
KERN_INFO
"%s: link down
\n
"
,
dev
->
name
);
}
...
...
drivers/net/bmac.c
浏览文件 @
7d17c1d6
...
...
@@ -1412,7 +1412,6 @@ static int bmac_open(struct net_device *dev)
bp
->
opened
=
1
;
bmac_reset_and_enable
(
dev
);
enable_irq
(
dev
->
irq
);
dev
->
flags
|=
IFF_RUNNING
;
return
0
;
}
...
...
@@ -1425,7 +1424,6 @@ static int bmac_close(struct net_device *dev)
int
i
;
bp
->
sleeping
=
1
;
dev
->
flags
&=
~
(
IFF_UP
|
IFF_RUNNING
);
/* disable rx and tx */
config
=
bmread
(
dev
,
RXCFG
);
...
...
drivers/net/sk98lin/skge.c
浏览文件 @
7d17c1d6
...
...
@@ -4212,7 +4212,7 @@ SK_BOOL DualNet;
Flags
);
SkGeStopPort
(
pAC
,
IoC
,
FromPort
,
SK_STOP_ALL
,
SK_HARD_RST
);
pAC
->
dev
[
Param
.
Para32
[
0
]]
->
flags
&=
~
IFF_RUNNING
;
netif_carrier_off
(
pAC
->
dev
[
Param
.
Para32
[
0
]])
;
spin_unlock_irqrestore
(
&
pAC
->
TxPort
[
FromPort
][
TX_PRIO_LOW
].
TxDesRingLock
,
Flags
);
...
...
@@ -4355,7 +4355,7 @@ SK_BOOL DualNet;
}
/* Inform the world that link protocol is up. */
pAC
->
dev
[
Param
.
Para32
[
0
]]
->
flags
|=
IFF_RUNNING
;
netif_carrier_on
(
pAC
->
dev
[
Param
.
Para32
[
0
]])
;
break
;
case
SK_DRV_NET_DOWN
:
/* SK_U32 Reason */
...
...
@@ -4368,7 +4368,7 @@ SK_BOOL DualNet;
}
else
{
DoPrintInterfaceChange
=
SK_TRUE
;
}
pAC
->
dev
[
Param
.
Para32
[
1
]]
->
flags
&=
~
IFF_RUNNING
;
netif_carrier_off
(
pAC
->
dev
[
Param
.
Para32
[
1
]])
;
break
;
case
SK_DRV_SWITCH_HARD
:
/* SK_U32 FromPortIdx SK_U32 ToPortIdx */
SK_DBG_MSG
(
NULL
,
SK_DBGMOD_DRV
,
SK_DBGCAT_DRV_EVENT
,
...
...
@@ -4961,7 +4961,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
#ifdef CONFIG_NET_POLL_CONTROLLER
dev
->
poll_controller
=
&
SkGePollController
;
#endif
dev
->
flags
&=
~
IFF_RUNNING
;
SET_NETDEV_DEV
(
dev
,
&
pdev
->
dev
);
SET_ETHTOOL_OPS
(
dev
,
&
SkGeEthtoolOps
);
...
...
@@ -5035,7 +5034,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
dev
->
set_mac_address
=
&
SkGeSetMacAddr
;
dev
->
do_ioctl
=
&
SkGeIoctl
;
dev
->
change_mtu
=
&
SkGeChangeMtu
;
dev
->
flags
&=
~
IFF_RUNNING
;
SET_NETDEV_DEV
(
dev
,
&
pdev
->
dev
);
SET_ETHTOOL_OPS
(
dev
,
&
SkGeEthtoolOps
);
...
...
drivers/net/tlan.c
浏览文件 @
7d17c1d6
...
...
@@ -2807,7 +2807,7 @@ void TLan_PhyMonitor( struct net_device *dev )
if
(
priv
->
link
)
{
priv
->
link
=
0
;
printk
(
KERN_DEBUG
"TLAN: %s has lost link
\n
"
,
dev
->
name
);
dev
->
flags
&=
~
IFF_RUNNING
;
netif_carrier_off
(
dev
)
;
TLan_SetTimer
(
dev
,
(
2
*
HZ
),
TLAN_TIMER_LINK_BEAT
);
return
;
}
...
...
@@ -2817,7 +2817,7 @@ void TLan_PhyMonitor( struct net_device *dev )
if
((
phy_status
&
MII_GS_LINK
)
&&
!
priv
->
link
)
{
priv
->
link
=
1
;
printk
(
KERN_DEBUG
"TLAN: %s has reestablished link
\n
"
,
dev
->
name
);
dev
->
flags
|=
IFF_RUNNING
;
netif_carrier_on
(
dev
)
;
}
/* Setup a new monitor */
...
...
drivers/net/tokenring/ibmtr.c
浏览文件 @
7d17c1d6
...
...
@@ -888,11 +888,6 @@ static int tok_open(struct net_device *dev)
ti
->
sap_status
=
CLOSED
;
/* CLOSED or OPEN */
ti
->
open_failure
=
NO
;
/* NO or YES */
ti
->
open_mode
=
MANUAL
;
/* MANUAL or AUTOMATIC */
/* 12/2000 not typical Linux, but we can use RUNNING to let us know when
the network has crapped out or cables are disconnected. Useful because
the IFF_UP flag stays up the whole time, until ifconfig tr0 down.
*/
dev
->
flags
&=
~
IFF_RUNNING
;
ti
->
sram_phys
&=
~
1
;
/* to reverse what we do in tok_close */
/* init the spinlock */
...
...
@@ -1242,7 +1237,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ti
->
open_status
=
CLOSED
;
ti
->
sap_status
=
CLOSED
;
ti
->
open_mode
=
AUTOMATIC
;
dev
->
flags
&=
~
IFF_RUNNING
;
netif_carrier_off
(
dev
)
;
netif_stop_queue
(
dev
);
ti
->
open_action
=
RESTART
;
outb
(
0
,
dev
->
base_addr
+
ADAPTRESET
);
...
...
@@ -1323,7 +1318,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
break
;
}
netif_wake_queue
(
dev
);
dev
->
flags
|=
IFF_RUNNING
;
/*BMS 12/2000*/
netif_carrier_on
(
dev
);
break
;
case
DIR_INTERRUPT
:
case
DIR_MOD_OPEN_PARAMS
:
...
...
@@ -1427,7 +1422,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ring_status
);
if
(
ring_status
&
(
REMOVE_RECV
|
AUTO_REMOVAL
|
LOBE_FAULT
)){
netif_stop_queue
(
dev
);
dev
->
flags
&=
~
IFF_RUNNING
;
/*not typical Linux*/
netif_carrier_off
(
dev
);
DPRINTK
(
"Remove received, or Auto-removal error"
", or Lobe fault
\n
"
);
DPRINTK
(
"We'll try to reopen the closed adapter"
...
...
drivers/net/wan/lmc/lmc_main.c
浏览文件 @
7d17c1d6
...
...
@@ -723,7 +723,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/
/* lmc_reset (sc); Why reset??? The link can go down ok */
/* Inform the world that link has been lost */
dev
->
flags
&=
~
IFF_RUNNING
;
netif_carrier_off
(
dev
)
;
}
/*
...
...
@@ -736,7 +736,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/
/* lmc_reset (sc); Again why reset??? */
/* Inform the world that link protocol is back up. */
dev
->
flags
|=
IFF_RUNNING
;
netif_carrier_on
(
dev
)
;
/* Now we have to tell the syncppp that we had an outage
* and that it should deal. Calling sppp_reopen here
...
...
@@ -1168,8 +1168,6 @@ static void lmc_running_reset (struct net_device *dev) /*fold00*/
sc
->
lmc_media
->
set_link_status
(
sc
,
1
);
sc
->
lmc_media
->
set_status
(
sc
,
NULL
);
//dev->flags |= IFF_RUNNING;
netif_wake_queue
(
dev
);
sc
->
lmc_txfull
=
0
;
...
...
@@ -1233,8 +1231,6 @@ static int lmc_ifdown (struct net_device *dev) /*fold00*/
csr6
&=
~
LMC_DEC_SR
;
/* Turn off the Receive bit */
LMC_CSR_WRITE
(
sc
,
csr_command
,
csr6
);
dev
->
flags
&=
~
IFF_RUNNING
;
sc
->
stats
.
rx_missed_errors
+=
LMC_CSR_READ
(
sc
,
csr_missed_frames
)
&
0xffff
;
...
...
include/linux/if.h
浏览文件 @
7d17c1d6
...
...
@@ -33,7 +33,7 @@
#define IFF_LOOPBACK 0x8
/* is a loopback net */
#define IFF_POINTOPOINT 0x10
/* interface is has p-p link */
#define IFF_NOTRAILERS 0x20
/* avoid use of trailers */
#define IFF_RUNNING 0x40
/*
resources allocated
*/
#define IFF_RUNNING 0x40
/*
interface running and carrier ok
*/
#define IFF_NOARP 0x80
/* no ARP protocol */
#define IFF_PROMISC 0x100
/* receive all packets */
#define IFF_ALLMULTI 0x200
/* receive all multicast packets*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录