Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
ed071adc
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ed071adc
编写于
3月 11, 2006
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master'
上级
6971ed1f
53574487
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
62 addition
and
43 deletion
+62
-43
Makefile
Makefile
+1
-1
drivers/net/3c509.c
drivers/net/3c509.c
+8
-5
drivers/net/Kconfig
drivers/net/Kconfig
+2
-1
drivers/net/de620.c
drivers/net/de620.c
+1
-1
drivers/net/dl2k.c
drivers/net/dl2k.c
+15
-10
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+1
-1
drivers/net/sky2.c
drivers/net/sky2.c
+21
-11
drivers/net/tulip/de2104x.c
drivers/net/tulip/de2104x.c
+13
-13
未找到文件。
Makefile
浏览文件 @
ed071adc
VERSION
=
2
PATCHLEVEL
=
6
SUBLEVEL
=
16
EXTRAVERSION
=
-rc
5
EXTRAVERSION
=
-rc
6
NAME
=
Sliding Snow Leopard
# *DOCUMENTATION*
...
...
drivers/net/3c509.c
浏览文件 @
ed071adc
...
...
@@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL");
static
int
__init
el3_init_module
(
void
)
{
int
ret
=
0
;
el3_cards
=
0
;
if
(
debug
>=
0
)
...
...
@@ -1589,14 +1590,16 @@ static int __init el3_init_module(void)
}
#ifdef CONFIG_EISA
if
(
eisa_driver_register
(
&
el3_eisa_driver
)
<
0
)
{
eisa_driver_unregister
(
&
el3_eisa_driver
);
}
ret
=
eisa_driver_register
(
&
el3_eisa_driver
);
#endif
#ifdef CONFIG_MCA
mca_register_driver
(
&
el3_mca_driver
);
{
int
err
=
mca_register_driver
(
&
el3_mca_driver
);
if
(
ret
==
0
)
ret
=
err
;
}
#endif
return
0
;
return
ret
;
}
static
void
__exit
el3_cleanup_module
(
void
)
...
...
drivers/net/Kconfig
浏览文件 @
ed071adc
...
...
@@ -1087,7 +1087,8 @@ config NE2000
without a specific driver are compatible with NE2000.
If you have a PCI NE2000 card however, say N here and Y to "PCI
NE2000 support", above. If you have a NE2000 card and are running on
NE2000 and clone support" under "EISA, VLB, PCI and on board
controllers" below. If you have a NE2000 card and are running on
an MCA system (a bus system used on some IBM PS/2 computers and
laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
below.
...
...
drivers/net/de620.c
浏览文件 @
ed071adc
...
...
@@ -1012,7 +1012,7 @@ static int __init read_eeprom(struct net_device *dev)
#ifdef MODULE
static
struct
net_device
*
de620_dev
;
int
init_module
(
void
)
int
__init
init_module
(
void
)
{
de620_dev
=
de620_probe
(
-
1
);
if
(
IS_ERR
(
de620_dev
))
...
...
drivers/net/dl2k.c
浏览文件 @
ed071adc
...
...
@@ -50,8 +50,8 @@
*/
#define DRV_NAME "D-Link DL2000-based linux driver"
#define DRV_VERSION "v1.17
a
"
#define DRV_RELDATE "200
2/10/04
"
#define DRV_VERSION "v1.17
b
"
#define DRV_RELDATE "200
6/03/10
"
#include "dl2k.h"
static
char
version
[]
__devinitdata
=
...
...
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq)
break
;
skb
=
np
->
tx_skbuff
[
entry
];
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
entry
].
fraginfo
,
np
->
tx_ring
[
entry
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_TODEVICE
);
if
(
irq
)
dev_kfree_skb_irq
(
skb
);
...
...
@@ -892,14 +892,16 @@ receive_packet (struct net_device *dev)
/* Small skbuffs for short packets */
if
(
pkt_len
>
copy_thresh
)
{
pci_unmap_single
(
np
->
pdev
,
desc
->
fraginfo
,
pci_unmap_single
(
np
->
pdev
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
skb_put
(
skb
=
np
->
rx_skbuff
[
entry
],
pkt_len
);
np
->
rx_skbuff
[
entry
]
=
NULL
;
}
else
if
((
skb
=
dev_alloc_skb
(
pkt_len
+
2
))
!=
NULL
)
{
pci_dma_sync_single_for_cpu
(
np
->
pdev
,
desc
->
fraginfo
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
skb
->
dev
=
dev
;
...
...
@@ -910,7 +912,8 @@ receive_packet (struct net_device *dev)
pkt_len
,
0
);
skb_put
(
skb
,
pkt_len
);
pci_dma_sync_single_for_device
(
np
->
pdev
,
desc
->
fraginfo
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
}
...
...
@@ -1796,8 +1799,9 @@ rio_close (struct net_device *dev)
np
->
rx_ring
[
i
].
fraginfo
=
0
;
skb
=
np
->
rx_skbuff
[
i
];
if
(
skb
)
{
pci_unmap_single
(
np
->
pdev
,
np
->
rx_ring
[
i
].
fraginfo
,
skb
->
len
,
PCI_DMA_FROMDEVICE
);
pci_unmap_single
(
np
->
pdev
,
np
->
rx_ring
[
i
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_FROMDEVICE
);
dev_kfree_skb
(
skb
);
np
->
rx_skbuff
[
i
]
=
NULL
;
}
...
...
@@ -1805,8 +1809,9 @@ rio_close (struct net_device *dev)
for
(
i
=
0
;
i
<
TX_RING_SIZE
;
i
++
)
{
skb
=
np
->
tx_skbuff
[
i
];
if
(
skb
)
{
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
i
].
fraginfo
,
skb
->
len
,
PCI_DMA_TODEVICE
);
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
i
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_TODEVICE
);
dev_kfree_skb
(
skb
);
np
->
tx_skbuff
[
i
]
=
NULL
;
}
...
...
drivers/net/e1000/e1000_main.c
浏览文件 @
ed071adc
...
...
@@ -2917,7 +2917,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
if
(
!
__pskb_pull_tail
(
skb
,
pull_size
))
{
printk
(
KERN_ERR
"__pskb_pull_tail failed.
\n
"
);
dev_kfree_skb_any
(
skb
);
return
-
EFAULT
;
return
NETDEV_TX_OK
;
}
len
=
skb
->
len
-
skb
->
data_len
;
}
...
...
drivers/net/sky2.c
浏览文件 @
ed071adc
...
...
@@ -74,7 +74,7 @@
#define TX_RING_SIZE 512
#define TX_DEF_PENDING (TX_RING_SIZE - 1)
#define TX_MIN_PENDING 64
#define MAX_SKB_TX_LE (4 +
2
*MAX_SKB_FRAGS)
#define MAX_SKB_TX_LE (4 +
(sizeof(dma_addr_t)/sizeof(u32))
*MAX_SKB_FRAGS)
#define STATUS_RING_SIZE 2048
/* 2 ports * (TX + 2*RX) */
#define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le))
...
...
@@ -622,8 +622,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
/* Configure Rx MAC FIFO */
sky2_write8
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_RST_CLR
);
sky2_write
16
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_
RX_CTRL_DEF
);
sky2_write
32
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_
OPER_ON
|
GMF_RX_F_FL_ON
);
/* Flush Rx MAC FIFO on any flow control or error */
sky2_write16
(
hw
,
SK_REG
(
port
,
RX_GMF_FL_MSK
),
GMR_FS_ANY_ERR
);
...
...
@@ -995,6 +995,10 @@ static int sky2_rx_start(struct sky2_port *sky2)
sky2_rx_add
(
sky2
,
re
->
mapaddr
);
}
/* Truncate oversize frames */
sky2_write16
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_TR_THR
),
sky2
->
rx_bufsize
-
8
);
sky2_write32
(
hw
,
SK_REG
(
sky2
->
port
,
RX_GMF_CTRL_T
),
RX_TRUNC_ON
);
/* Tell chip about available buffers */
sky2_write16
(
hw
,
Y2_QADDR
(
rxq
,
PREF_UNIT_PUT_IDX
),
sky2
->
rx_put
);
sky2
->
rx_last_put
=
sky2_read16
(
hw
,
Y2_QADDR
(
rxq
,
PREF_UNIT_PUT_IDX
));
...
...
@@ -1145,6 +1149,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
struct
sky2_tx_le
*
le
=
NULL
;
struct
tx_ring_info
*
re
;
unsigned
i
,
len
;
int
avail
;
dma_addr_t
mapping
;
u32
addr64
;
u16
mss
;
...
...
@@ -1287,12 +1292,16 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
re
->
idx
=
sky2
->
tx_prod
;
le
->
ctrl
|=
EOP
;
avail
=
tx_avail
(
sky2
);
if
(
mss
!=
0
||
avail
<
TX_MIN_PENDING
)
{
le
->
ctrl
|=
FRC_STAT
;
if
(
avail
<=
MAX_SKB_TX_LE
)
netif_stop_queue
(
dev
);
}
sky2_put_idx
(
hw
,
txqaddr
[
sky2
->
port
],
sky2
->
tx_prod
,
&
sky2
->
tx_last_put
,
TX_RING_SIZE
);
if
(
tx_avail
(
sky2
)
<=
MAX_SKB_TX_LE
)
netif_stop_queue
(
dev
);
out_unlock:
spin_unlock
(
&
sky2
->
tx_lock
);
...
...
@@ -1707,10 +1716,12 @@ static void sky2_tx_timeout(struct net_device *dev)
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
/* Want receive buffer size to be multiple of 64 bits, and incl room for vlan */
/* Want receive buffer size to be multiple of 64 bits
* and incl room for vlan and truncation
*/
static
inline
unsigned
sky2_buf_size
(
int
mtu
)
{
return
roundup
(
mtu
+
ETH_HLEN
+
4
,
8
)
;
return
roundup
(
mtu
+
ETH_HLEN
+
VLAN_HLEN
,
8
)
+
8
;
}
static
int
sky2_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
...
...
@@ -1793,7 +1804,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2,
if
(
!
(
status
&
GMR_FS_RX_OK
))
goto
resubmit
;
if
(
(
status
>>
16
)
!=
length
||
length
>
sky2
->
rx_bufsize
)
if
(
length
>
sky2
->
netdev
->
mtu
+
ETH_HLEN
)
goto
oversize
;
if
(
length
<
copybreak
)
{
...
...
@@ -3243,8 +3254,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
}
}
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
|
SA_SAMPLE_RANDOM
,
DRV_NAME
,
hw
);
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
,
DRV_NAME
,
hw
);
if
(
err
)
{
printk
(
KERN_ERR
PFX
"%s: cannot assign irq %d
\n
"
,
pci_name
(
pdev
),
pdev
->
irq
);
...
...
drivers/net/tulip/de2104x.c
浏览文件 @
ed071adc
...
...
@@ -1362,7 +1362,6 @@ static int de_open (struct net_device *dev)
{
struct
de_private
*
de
=
dev
->
priv
;
int
rc
;
unsigned
long
flags
;
if
(
netif_msg_ifup
(
de
))
printk
(
KERN_DEBUG
"%s: enabling interface
\n
"
,
dev
->
name
);
...
...
@@ -1376,18 +1375,20 @@ static int de_open (struct net_device *dev)
return
rc
;
}
rc
=
de_init_hw
(
de
);
if
(
rc
)
{
printk
(
KERN_ERR
"%s: h/w init failure, err=%d
\n
"
,
dev
->
name
,
rc
);
goto
err_out_free
;
}
dw32
(
IntrMask
,
0
);
rc
=
request_irq
(
dev
->
irq
,
de_interrupt
,
SA_SHIRQ
,
dev
->
name
,
dev
);
if
(
rc
)
{
printk
(
KERN_ERR
"%s: IRQ %d request failure, err=%d
\n
"
,
dev
->
name
,
dev
->
irq
,
rc
);
goto
err_out_hw
;
goto
err_out_free
;
}
rc
=
de_init_hw
(
de
);
if
(
rc
)
{
printk
(
KERN_ERR
"%s: h/w init failure, err=%d
\n
"
,
dev
->
name
,
rc
);
goto
err_out_free_irq
;
}
netif_start_queue
(
dev
);
...
...
@@ -1395,11 +1396,8 @@ static int de_open (struct net_device *dev)
return
0
;
err_out_hw:
spin_lock_irqsave
(
&
de
->
lock
,
flags
);
de_stop_hw
(
de
);
spin_unlock_irqrestore
(
&
de
->
lock
,
flags
);
err_out_free_irq:
free_irq
(
dev
->
irq
,
dev
);
err_out_free:
de_free_rings
(
de
);
return
rc
;
...
...
@@ -1455,6 +1453,8 @@ static void de_tx_timeout (struct net_device *dev)
synchronize_irq
(
dev
->
irq
);
de_clean_rings
(
de
);
de_init_rings
(
de
);
de_init_hw
(
de
);
netif_wake_queue
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录