Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
186051d7
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
186051d7
编写于
9月 14, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
上级
668e4bc7
e172577d
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
94 addition
and
84 deletion
+94
-84
drivers/net/Kconfig
drivers/net/Kconfig
+1
-1
drivers/net/e100.c
drivers/net/e100.c
+1
-3
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+0
-1
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_main.c
+0
-2
drivers/net/s2io.c
drivers/net/s2io.c
+5
-4
drivers/net/sk98lin/skge.c
drivers/net/sk98lin/skge.c
+5
-7
drivers/net/skge.c
drivers/net/skge.c
+54
-44
drivers/net/skge.h
drivers/net/skge.h
+1
-1
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_cb.c
+1
-1
drivers/net/wireless/airo.c
drivers/net/wireless/airo.c
+4
-1
drivers/s390/net/ctcmain.c
drivers/s390/net/ctcmain.c
+22
-19
未找到文件。
drivers/net/Kconfig
浏览文件 @
186051d7
...
...
@@ -1951,7 +1951,7 @@ config SKGE
---help---
This driver support the Marvell Yukon or SysKonnect SK-98xx/SK-95xx
and related Gigabit Ethernet adapters. It is a new smaller driver
driver
with better performance and more complete ethtool support.
with better performance and more complete ethtool support.
It does not support the link failover and network management
features that "portable" vendor supplied sk98lin driver does.
...
...
drivers/net/e100.c
浏览文件 @
186051d7
...
...
@@ -1387,13 +1387,13 @@ static void e100_update_stats(struct nic *nic)
ns
->
collisions
+=
nic
->
tx_collisions
;
ns
->
tx_errors
+=
le32_to_cpu
(
s
->
tx_max_collisions
)
+
le32_to_cpu
(
s
->
tx_lost_crs
);
ns
->
rx_dropped
+=
le32_to_cpu
(
s
->
rx_resource_errors
);
ns
->
rx_length_errors
+=
le32_to_cpu
(
s
->
rx_short_frame_errors
)
+
nic
->
rx_over_length_errors
;
ns
->
rx_crc_errors
+=
le32_to_cpu
(
s
->
rx_crc_errors
);
ns
->
rx_frame_errors
+=
le32_to_cpu
(
s
->
rx_alignment_errors
);
ns
->
rx_over_errors
+=
le32_to_cpu
(
s
->
rx_overrun_errors
);
ns
->
rx_fifo_errors
+=
le32_to_cpu
(
s
->
rx_overrun_errors
);
ns
->
rx_missed_errors
+=
le32_to_cpu
(
s
->
rx_resource_errors
);
ns
->
rx_errors
+=
le32_to_cpu
(
s
->
rx_crc_errors
)
+
le32_to_cpu
(
s
->
rx_alignment_errors
)
+
le32_to_cpu
(
s
->
rx_short_frame_errors
)
+
...
...
@@ -1727,12 +1727,10 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx,
if
(
unlikely
(
!
(
rfd_status
&
cb_ok
)))
{
/* Don't indicate if hardware indicates errors */
nic
->
net_stats
.
rx_dropped
++
;
dev_kfree_skb_any
(
skb
);
}
else
if
(
actual_size
>
ETH_DATA_LEN
+
VLAN_ETH_HLEN
)
{
/* Don't indicate oversized frames */
nic
->
rx_over_length_errors
++
;
nic
->
net_stats
.
rx_dropped
++
;
dev_kfree_skb_any
(
skb
);
}
else
{
nic
->
net_stats
.
rx_packets
++
;
...
...
drivers/net/e1000/e1000_main.c
浏览文件 @
186051d7
...
...
@@ -2544,7 +2544,6 @@ e1000_update_stats(struct e1000_adapter *adapter)
adapter
->
stats
.
crcerrs
+
adapter
->
stats
.
algnerrc
+
adapter
->
stats
.
rlec
+
adapter
->
stats
.
mpc
+
adapter
->
stats
.
cexterr
;
adapter
->
net_stats
.
rx_dropped
=
adapter
->
stats
.
mpc
;
adapter
->
net_stats
.
rx_length_errors
=
adapter
->
stats
.
rlec
;
adapter
->
net_stats
.
rx_crc_errors
=
adapter
->
stats
.
crcerrs
;
adapter
->
net_stats
.
rx_frame_errors
=
adapter
->
stats
.
algnerrc
;
...
...
drivers/net/ixgb/ixgb_main.c
浏览文件 @
186051d7
...
...
@@ -1616,8 +1616,6 @@ ixgb_update_stats(struct ixgb_adapter *adapter)
adapter
->
stats
.
icbc
+
adapter
->
stats
.
ecbc
+
adapter
->
stats
.
mpc
;
adapter
->
net_stats
.
rx_dropped
=
adapter
->
stats
.
mpc
;
/* see above
* adapter->net_stats.rx_length_errors = adapter->stats.rlec;
*/
...
...
drivers/net/s2io.c
浏览文件 @
186051d7
...
...
@@ -428,7 +428,7 @@ static int init_shared_mem(struct s2io_nic *nic)
DBG_PRINT
(
INIT_DBG
,
"%s: Zero DMA address for TxDL. "
,
dev
->
name
);
DBG_PRINT
(
INIT_DBG
,
"Virtual address %
llx
\n
"
,
(
u64
)
tmp_v
);
"Virtual address %
p
\n
"
,
tmp_v
);
tmp_v
=
pci_alloc_consistent
(
nic
->
pdev
,
PAGE_SIZE
,
&
tmp_p
);
if
(
!
tmp_v
)
{
...
...
@@ -657,9 +657,10 @@ static void free_shared_mem(struct s2io_nic *nic)
mac_control
->
zerodma_virt_addr
,
(
dma_addr_t
)
0
);
DBG_PRINT
(
INIT_DBG
,
"%s: Freeing TxDL with zero DMA addr. "
,
dev
->
name
);
DBG_PRINT
(
INIT_DBG
,
"Virtual address %llx
\n
"
,
(
u64
)(
mac_control
->
zerodma_virt_addr
));
"%s: Freeing TxDL with zero DMA addr. "
,
dev
->
name
);
DBG_PRINT
(
INIT_DBG
,
"Virtual address %p
\n
"
,
mac_control
->
zerodma_virt_addr
);
}
kfree
(
mac_control
->
fifos
[
i
].
list_info
);
}
...
...
drivers/net/sk98lin/skge.c
浏览文件 @
186051d7
...
...
@@ -5216,17 +5216,15 @@ static struct pci_device_id skge_pci_tbl[] = {
{
PCI_VENDOR_ID_3COM
,
0x80eb
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_SYSKONNECT
,
0x4300
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_SYSKONNECT
,
0x4320
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_DLINK
,
0x4c00
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
/* DLink card does not have valid VPD so this driver gags
* { PCI_VENDOR_ID_DLINK, 0x4c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
*/
{
PCI_VENDOR_ID_MARVELL
,
0x4320
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
#if 0 /* don't handle Yukon2 cards at the moment -- mlindner@syskonnect.de */
{ PCI_VENDOR_ID_MARVELL, 0x4360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VENDOR_ID_MARVELL, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
#endif
{
PCI_VENDOR_ID_MARVELL
,
0x5005
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_CNET
,
0x434e
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_LINKSYS
,
0x1032
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_LINKSYS
,
0x1032
,
PCI_ANY_ID
,
0x0015
,
},
{
PCI_VENDOR_ID_LINKSYS
,
0x1064
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
}
{
0
}
};
MODULE_DEVICE_TABLE
(
pci
,
skge_pci_tbl
);
...
...
drivers/net/skge.c
浏览文件 @
186051d7
...
...
@@ -42,7 +42,7 @@
#include "skge.h"
#define DRV_NAME "skge"
#define DRV_VERSION "
0.9
"
#define DRV_VERSION "
1.0
"
#define PFX DRV_NAME " "
#define DEFAULT_TX_RING_SIZE 128
...
...
@@ -987,6 +987,8 @@ static void genesis_reset(struct skge_hw *hw, int port)
{
const
u8
zero
[
8
]
=
{
0
};
skge_write8
(
hw
,
SK_REG
(
port
,
GMAC_IRQ_MSK
),
0
);
/* reset the statistics module */
xm_write32
(
hw
,
port
,
XM_GP_PORT
,
XM_GP_RES_STAT
);
xm_write16
(
hw
,
port
,
XM_IMSK
,
0xffff
);
/* disable XMAC IRQs */
...
...
@@ -1021,8 +1023,6 @@ static void bcom_check_link(struct skge_hw *hw, int port)
(
void
)
xm_phy_read
(
hw
,
port
,
PHY_BCOM_STAT
);
status
=
xm_phy_read
(
hw
,
port
,
PHY_BCOM_STAT
);
pr_debug
(
"bcom_check_link status=0x%x
\n
"
,
status
);
if
((
status
&
PHY_ST_LSYNC
)
==
0
)
{
u16
cmd
=
xm_read16
(
hw
,
port
,
XM_MMU_CMD
);
cmd
&=
~
(
XM_MMU_ENA_RX
|
XM_MMU_ENA_TX
);
...
...
@@ -1106,8 +1106,6 @@ static void bcom_phy_init(struct skge_port *skge, int jumbo)
{
0x17
,
0x0013
},
{
0x15
,
0x0A04
},
{
0x18
,
0x0420
},
};
pr_debug
(
"bcom_phy_init
\n
"
);
/* read Id from external PHY (all have the same address) */
id1
=
xm_phy_read
(
hw
,
port
,
PHY_XMAC_ID1
);
...
...
@@ -1340,6 +1338,8 @@ static void genesis_stop(struct skge_port *skge)
int
port
=
skge
->
port
;
u32
reg
;
genesis_reset
(
hw
,
port
);
/* Clear Tx packet arbiter timeout IRQ */
skge_write16
(
hw
,
B3_PA_CTRL
,
port
==
0
?
PA_CLR_TO_TX1
:
PA_CLR_TO_TX2
);
...
...
@@ -1465,7 +1465,6 @@ static void genesis_link_up(struct skge_port *skge)
u16
cmd
;
u32
mode
,
msk
;
pr_debug
(
"genesis_link_up
\n
"
);
cmd
=
xm_read16
(
hw
,
port
,
XM_MMU_CMD
);
/*
...
...
@@ -1578,7 +1577,6 @@ static void yukon_init(struct skge_hw *hw, int port)
struct
skge_port
*
skge
=
netdev_priv
(
hw
->
dev
[
port
]);
u16
ctrl
,
ct1000
,
adv
;
pr_debug
(
"yukon_init
\n
"
);
if
(
skge
->
autoneg
==
AUTONEG_ENABLE
)
{
u16
ectrl
=
gm_phy_read
(
hw
,
port
,
PHY_MARV_EXT_CTRL
);
...
...
@@ -1677,9 +1675,11 @@ static void yukon_mac_init(struct skge_hw *hw, int port)
/* WA code for COMA mode -- set PHY reset */
if
(
hw
->
chip_id
==
CHIP_ID_YUKON_LITE
&&
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
skge_write32
(
hw
,
B2_GP_IO
,
(
skge_read32
(
hw
,
B2_GP_IO
)
|
GP_DIR_9
|
GP_IO_9
));
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
{
reg
=
skge_read32
(
hw
,
B2_GP_IO
);
reg
|=
GP_DIR_9
|
GP_IO_9
;
skge_write32
(
hw
,
B2_GP_IO
,
reg
);
}
/* hard reset */
skge_write32
(
hw
,
SK_REG
(
port
,
GPHY_CTRL
),
GPC_RST_SET
);
...
...
@@ -1687,10 +1687,12 @@ static void yukon_mac_init(struct skge_hw *hw, int port)
/* WA code for COMA mode -- clear PHY reset */
if
(
hw
->
chip_id
==
CHIP_ID_YUKON_LITE
&&
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
skge_write32
(
hw
,
B2_GP_IO
,
(
skge_read32
(
hw
,
B2_GP_IO
)
|
GP_DIR_9
)
&
~
GP_IO_9
);
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
{
reg
=
skge_read32
(
hw
,
B2_GP_IO
);
reg
|=
GP_DIR_9
;
reg
&=
~
GP_IO_9
;
skge_write32
(
hw
,
B2_GP_IO
,
reg
);
}
/* Set hardware config mode */
reg
=
GPC_INT_POL_HI
|
GPC_DIS_FC
|
GPC_DIS_SLEEP
|
...
...
@@ -1729,7 +1731,7 @@ static void yukon_mac_init(struct skge_hw *hw, int port)
}
gma_write16
(
hw
,
port
,
GM_GP_CTRL
,
reg
);
skge_read16
(
hw
,
GMAC_IRQ_SRC
);
skge_read16
(
hw
,
SK_REG
(
port
,
GMAC_IRQ_SRC
)
);
yukon_init
(
hw
,
port
);
...
...
@@ -1801,20 +1803,26 @@ static void yukon_stop(struct skge_port *skge)
struct
skge_hw
*
hw
=
skge
->
hw
;
int
port
=
skge
->
port
;
if
(
hw
->
chip_id
==
CHIP_ID_YUKON_LITE
&&
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
{
skge_write32
(
hw
,
B2_GP_IO
,
skge_read32
(
hw
,
B2_GP_IO
)
|
GP_DIR_9
|
GP_IO_9
);
}
skge_write8
(
hw
,
SK_REG
(
port
,
GMAC_IRQ_MSK
),
0
);
yukon_reset
(
hw
,
port
);
gma_write16
(
hw
,
port
,
GM_GP_CTRL
,
gma_read16
(
hw
,
port
,
GM_GP_CTRL
)
&
~
(
GM_GPCR_TX_ENA
|
GM_GPCR_RX_ENA
));
gma_read16
(
hw
,
port
,
GM_GP_CTRL
);
if
(
hw
->
chip_id
==
CHIP_ID_YUKON_LITE
&&
hw
->
chip_rev
>=
CHIP_REV_YU_LITE_A3
)
{
u32
io
=
skge_read32
(
hw
,
B2_GP_IO
);
io
|=
GP_DIR_9
|
GP_IO_9
;
skge_write32
(
hw
,
B2_GP_IO
,
io
);
skge_read32
(
hw
,
B2_GP_IO
);
}
/* set GPHY Control reset */
skge_write
32
(
hw
,
SK_REG
(
port
,
GPHY_CTRL
),
GPC_RST_SET
);
skge_write
32
(
hw
,
SK_REG
(
port
,
GMAC_CTRL
),
GMC_RST_SET
);
skge_write
8
(
hw
,
SK_REG
(
port
,
GPHY_CTRL
),
GPC_RST_SET
);
skge_write
8
(
hw
,
SK_REG
(
port
,
GMAC_CTRL
),
GMC_RST_SET
);
}
static
void
yukon_get_stats
(
struct
skge_port
*
skge
,
u64
*
data
)
...
...
@@ -1873,10 +1881,8 @@ static void yukon_link_up(struct skge_port *skge)
int
port
=
skge
->
port
;
u16
reg
;
pr_debug
(
"yukon_link_up
\n
"
);
/* Enable Transmit FIFO Underrun */
skge_write8
(
hw
,
GMAC_IRQ_MSK
,
GMAC_DEF_MSK
);
skge_write8
(
hw
,
SK_REG
(
port
,
GMAC_IRQ_MSK
)
,
GMAC_DEF_MSK
);
reg
=
gma_read16
(
hw
,
port
,
GM_GP_CTRL
);
if
(
skge
->
duplex
==
DUPLEX_FULL
||
skge
->
autoneg
==
AUTONEG_ENABLE
)
...
...
@@ -1896,7 +1902,6 @@ static void yukon_link_down(struct skge_port *skge)
int
port
=
skge
->
port
;
u16
ctrl
;
pr_debug
(
"yukon_link_down
\n
"
);
gm_phy_write
(
hw
,
port
,
PHY_MARV_INT_MASK
,
0
);
ctrl
=
gma_read16
(
hw
,
port
,
GM_GP_CTRL
);
...
...
@@ -2112,7 +2117,6 @@ static int skge_up(struct net_device *dev)
skge_write8
(
hw
,
Q_ADDR
(
rxqaddr
[
port
],
Q_CSR
),
CSR_START
|
CSR_IRQ_CL_F
);
skge_led
(
skge
,
LED_MODE_ON
);
pr_debug
(
"skge_up completed
\n
"
);
return
0
;
free_rx_ring:
...
...
@@ -2135,15 +2139,20 @@ static int skge_down(struct net_device *dev)
netif_stop_queue
(
dev
);
skge_write8
(
skge
->
hw
,
SK_REG
(
skge
->
port
,
LNK_LED_REG
),
LED_OFF
);
if
(
hw
->
chip_id
==
CHIP_ID_GENESIS
)
genesis_stop
(
skge
);
else
yukon_stop
(
skge
);
hw
->
intr_mask
&=
~
portirqmask
[
skge
->
port
];
skge_write32
(
hw
,
B0_IMSK
,
hw
->
intr_mask
);
/* Stop transmitter */
skge_write8
(
hw
,
Q_ADDR
(
txqaddr
[
port
],
Q_CSR
),
CSR_STOP
);
skge_write32
(
hw
,
RB_ADDR
(
txqaddr
[
port
],
RB_CTRL
),
RB_RST_SET
|
RB_DIS_OP_MD
);
if
(
hw
->
chip_id
==
CHIP_ID_GENESIS
)
genesis_stop
(
skge
);
else
yukon_stop
(
skge
);
/* Disable Force Sync bit and Enable Alloc bit */
skge_write8
(
hw
,
SK_REG
(
port
,
TXA_CTRL
),
...
...
@@ -2367,8 +2376,6 @@ static void genesis_set_multicast(struct net_device *dev)
u32
mode
;
u8
filter
[
8
];
pr_debug
(
"genesis_set_multicast flags=%x count=%d
\n
"
,
dev
->
flags
,
dev
->
mc_count
);
mode
=
xm_read32
(
hw
,
port
,
XM_MODE
);
mode
|=
XM_MD_ENA_HASH
;
if
(
dev
->
flags
&
IFF_PROMISC
)
...
...
@@ -2530,8 +2537,6 @@ static int skge_poll(struct net_device *dev, int *budget)
unsigned
int
to_do
=
min
(
dev
->
quota
,
*
budget
);
unsigned
int
work_done
=
0
;
pr_debug
(
"skge_poll
\n
"
);
for
(
e
=
ring
->
to_clean
;
work_done
<
to_do
;
e
=
e
->
next
)
{
struct
skge_rx_desc
*
rd
=
e
->
desc
;
struct
sk_buff
*
skb
;
...
...
@@ -2672,9 +2677,9 @@ static void skge_error_irq(struct skge_hw *hw)
if
(
hw
->
chip_id
==
CHIP_ID_GENESIS
)
{
/* clear xmac errors */
if
(
hwstatus
&
(
IS_NO_STAT_M1
|
IS_NO_TIST_M1
))
skge_write16
(
hw
,
SK_REG
(
0
,
RX_MFF_CTRL1
)
,
MFF_CLR_INSTAT
);
skge_write16
(
hw
,
RX_MFF_CTRL1
,
MFF_CLR_INSTAT
);
if
(
hwstatus
&
(
IS_NO_STAT_M2
|
IS_NO_TIST_M2
))
skge_write16
(
hw
,
SK_REG
(
0
,
RX_MFF_CTRL2
)
,
MFF_CLR_INSTAT
);
skge_write16
(
hw
,
RX_MFF_CTRL2
,
MFF_CLR_INSTAT
);
}
else
{
/* Timestamp (unused) overflow */
if
(
hwstatus
&
IS_IRQ_TIST_OV
)
...
...
@@ -3000,9 +3005,6 @@ static int skge_reset(struct skge_hw *hw)
skge_write32
(
hw
,
B0_IMSK
,
hw
->
intr_mask
);
if
(
hw
->
chip_id
!=
CHIP_ID_GENESIS
)
skge_write8
(
hw
,
GMAC_IRQ_MSK
,
0
);
spin_lock_bh
(
&
hw
->
phy_lock
);
for
(
i
=
0
;
i
<
hw
->
ports
;
i
++
)
{
if
(
hw
->
chip_id
==
CHIP_ID_GENESIS
)
...
...
@@ -3230,6 +3232,11 @@ static void __devexit skge_remove(struct pci_dev *pdev)
dev0
=
hw
->
dev
[
0
];
unregister_netdev
(
dev0
);
skge_write32
(
hw
,
B0_IMSK
,
0
);
skge_write16
(
hw
,
B0_LED
,
LED_STAT_OFF
);
skge_pci_clear
(
hw
);
skge_write8
(
hw
,
B0_CTST
,
CS_RST_SET
);
tasklet_kill
(
&
hw
->
ext_tasklet
);
free_irq
(
pdev
->
irq
,
hw
);
...
...
@@ -3238,7 +3245,7 @@ static void __devexit skge_remove(struct pci_dev *pdev)
if
(
dev1
)
free_netdev
(
dev1
);
free_netdev
(
dev0
);
skge_write16
(
hw
,
B0_LED
,
LED_STAT_OFF
);
iounmap
(
hw
->
regs
);
kfree
(
hw
);
pci_set_drvdata
(
pdev
,
NULL
);
...
...
@@ -3257,6 +3264,9 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state)
struct
skge_port
*
skge
=
netdev_priv
(
dev
);
if
(
netif_running
(
dev
))
{
netif_carrier_off
(
dev
);
if
(
skge
->
wol
)
netif_stop_queue
(
dev
);
else
skge_down
(
dev
);
}
netif_device_detach
(
dev
);
...
...
drivers/net/skge.h
浏览文件 @
186051d7
...
...
@@ -2008,7 +2008,7 @@ enum {
GM_IS_RX_FF_OR
=
1
<<
1
,
/* Receive FIFO Overrun */
GM_IS_RX_COMPL
=
1
<<
0
,
/* Frame Reception Complete */
#define GMAC_DEF_MSK (GM_IS_
TX_CO_OV | GM_IS_RX_CO_OV
| GM_IS_TX_FF_UR)
#define GMAC_DEF_MSK (GM_IS_
RX_FF_OR
| GM_IS_TX_FF_UR)
/* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */
/* Bits 15.. 2: reserved */
...
...
drivers/net/tulip/xircom_cb.c
浏览文件 @
186051d7
...
...
@@ -117,7 +117,7 @@ static int xircom_open(struct net_device *dev);
static
int
xircom_close
(
struct
net_device
*
dev
);
static
void
xircom_up
(
struct
xircom_private
*
card
);
static
struct
net_device_stats
*
xircom_get_stats
(
struct
net_device
*
dev
);
#if CONFIG_NET_POLL_CONTROLLER
#if
def
CONFIG_NET_POLL_CONTROLLER
static
void
xircom_poll_controller
(
struct
net_device
*
dev
);
#endif
...
...
drivers/net/wireless/airo.c
浏览文件 @
186051d7
...
...
@@ -6852,7 +6852,10 @@ static inline char *airo_translate_scan(struct net_device *dev,
/* Add frequency */
iwe
.
cmd
=
SIOCGIWFREQ
;
iwe
.
u
.
freq
.
m
=
le16_to_cpu
(
bss
->
dsChannel
);
iwe
.
u
.
freq
.
m
=
frequency_list
[
iwe
.
u
.
freq
.
m
]
*
100000
;
/* iwe.u.freq.m containt the channel (starting 1), our
* frequency_list array start at index 0...
*/
iwe
.
u
.
freq
.
m
=
frequency_list
[
iwe
.
u
.
freq
.
m
-
1
]
*
100000
;
iwe
.
u
.
freq
.
e
=
1
;
current_ev
=
iwe_stream_add_event
(
current_ev
,
end_buf
,
&
iwe
,
IW_EV_FREQ_LEN
);
...
...
drivers/s390/net/ctcmain.c
浏览文件 @
186051d7
/*
* $Id: ctcmain.c,v 1.7
4 2005/03/24 09:04:17 mschwide
Exp $
* $Id: ctcmain.c,v 1.7
8 2005/09/07 12:18:02 pavlic
Exp $
*
* CTC / ESCON network driver
*
...
...
@@ -37,10 +37,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.7
4
$
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.7
8
$
*
*/
#undef DEBUG
#include <linux/module.h>
#include <linux/init.h>
...
...
@@ -135,7 +134,7 @@ static const char *dev_event_names[] = {
"TX down"
,
"Restart"
,
};
/**
* Events of the channel statemachine
*/
...
...
@@ -249,7 +248,7 @@ static void
print_banner
(
void
)
{
static
int
printed
=
0
;
char
vbuf
[]
=
"$Revision: 1.7
4
$"
;
char
vbuf
[]
=
"$Revision: 1.7
8
$"
;
char
*
version
=
vbuf
;
if
(
printed
)
...
...
@@ -334,7 +333,7 @@ static const char *ch_state_names[] = {
"Restarting"
,
"Not operational"
,
};
#ifdef DEBUG
/**
* Dump header and first 16 bytes of an sk_buff for debugging purposes.
...
...
@@ -671,7 +670,7 @@ static void
fsm_action_nop
(
fsm_instance
*
fi
,
int
event
,
void
*
arg
)
{
}
/**
* Actions for channel - statemachines.
*****************************************************************************/
...
...
@@ -1514,7 +1513,6 @@ ch_action_reinit(fsm_instance *fi, int event, void *arg)
fsm_addtimer
(
&
privptr
->
restart_timer
,
1000
,
DEV_EVENT_RESTART
,
dev
);
}
/**
* The statemachine for a channel.
*/
...
...
@@ -1625,7 +1623,7 @@ static const fsm_node ch_fsm[] = {
};
static
const
int
CH_FSM_LEN
=
sizeof
(
ch_fsm
)
/
sizeof
(
fsm_node
);
/**
* Functions related to setup and device detection.
*****************************************************************************/
...
...
@@ -1976,7 +1974,7 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
fsm_event
(
ch
->
fsm
,
CH_EVENT_IRQ
,
ch
);
}
/**
* Actions for interface - statemachine.
*****************************************************************************/
...
...
@@ -2209,13 +2207,18 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
int
rc
=
0
;
DBF_TEXT
(
trace
,
5
,
__FUNCTION__
);
/* we need to acquire the lock for testing the state
* otherwise we can have an IRQ changing the state to
* TXIDLE after the test but before acquiring the lock.
*/
spin_lock_irqsave
(
&
ch
->
collect_lock
,
saveflags
);
if
(
fsm_getstate
(
ch
->
fsm
)
!=
CH_STATE_TXIDLE
)
{
int
l
=
skb
->
len
+
LL_HEADER_LENGTH
;
spin_lock_irqsave
(
&
ch
->
collect_lock
,
saveflags
);
if
(
ch
->
collect_len
+
l
>
ch
->
max_bufsize
-
2
)
r
c
=
-
EBUSY
;
else
{
if
(
ch
->
collect_len
+
l
>
ch
->
max_bufsize
-
2
)
{
spin_unlock_irqrestore
(
&
ch
->
collect_lock
,
saveflags
);
r
eturn
-
EBUSY
;
}
else
{
atomic_inc
(
&
skb
->
users
);
header
.
length
=
l
;
header
.
type
=
skb
->
protocol
;
...
...
@@ -2231,7 +2234,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
int
ccw_idx
;
struct
sk_buff
*
nskb
;
unsigned
long
hi
;
spin_unlock_irqrestore
(
&
ch
->
collect_lock
,
saveflags
);
/**
* Protect skb against beeing free'd by upper
* layers.
...
...
@@ -2256,6 +2259,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
if
(
!
nskb
)
{
atomic_dec
(
&
skb
->
users
);
skb_pull
(
skb
,
LL_HEADER_LENGTH
+
2
);
ctc_clear_busy
(
ch
->
netdev
);
return
-
ENOMEM
;
}
else
{
memcpy
(
skb_put
(
nskb
,
skb
->
len
),
...
...
@@ -2281,6 +2285,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
*/
atomic_dec
(
&
skb
->
users
);
skb_pull
(
skb
,
LL_HEADER_LENGTH
+
2
);
ctc_clear_busy
(
ch
->
netdev
);
return
-
EBUSY
;
}
...
...
@@ -2327,9 +2332,10 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
}
}
ctc_clear_busy
(
ch
->
netdev
);
return
rc
;
}
/**
* Interface API for upper network layers
*****************************************************************************/
...
...
@@ -2421,7 +2427,6 @@ ctc_tx(struct sk_buff *skb, struct net_device * dev)
dev
->
trans_start
=
jiffies
;
if
(
transmit_skb
(
privptr
->
channel
[
WRITE
],
skb
)
!=
0
)
rc
=
1
;
ctc_clear_busy
(
dev
);
return
rc
;
}
...
...
@@ -2610,7 +2615,6 @@ stats_write(struct device *dev, struct device_attribute *attr, const char *buf,
return
count
;
}
static
void
ctc_netdev_unregister
(
struct
net_device
*
dev
)
{
...
...
@@ -2685,7 +2689,6 @@ ctc_proto_store(struct device *dev, struct device_attribute *attr, const char *b
return
count
;
}
static
ssize_t
ctc_type_show
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录