Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ed071adc
Commit
ed071adc
authored
Mar 11, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master'
parents
6971ed1f
53574487
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
43 deletions
+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
No files found.
Makefile
View file @
ed071adc
VERSION
=
2
VERSION
=
2
PATCHLEVEL
=
6
PATCHLEVEL
=
6
SUBLEVEL
=
16
SUBLEVEL
=
16
EXTRAVERSION
=
-rc
5
EXTRAVERSION
=
-rc
6
NAME
=
Sliding Snow Leopard
NAME
=
Sliding Snow Leopard
# *DOCUMENTATION*
# *DOCUMENTATION*
...
...
drivers/net/3c509.c
View file @
ed071adc
...
@@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL");
...
@@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL");
static
int
__init
el3_init_module
(
void
)
static
int
__init
el3_init_module
(
void
)
{
{
int
ret
=
0
;
el3_cards
=
0
;
el3_cards
=
0
;
if
(
debug
>=
0
)
if
(
debug
>=
0
)
...
@@ -1589,14 +1590,16 @@ static int __init el3_init_module(void)
...
@@ -1589,14 +1590,16 @@ static int __init el3_init_module(void)
}
}
#ifdef CONFIG_EISA
#ifdef CONFIG_EISA
if
(
eisa_driver_register
(
&
el3_eisa_driver
)
<
0
)
{
ret
=
eisa_driver_register
(
&
el3_eisa_driver
);
eisa_driver_unregister
(
&
el3_eisa_driver
);
}
#endif
#endif
#ifdef CONFIG_MCA
#ifdef CONFIG_MCA
mca_register_driver
(
&
el3_mca_driver
);
{
int
err
=
mca_register_driver
(
&
el3_mca_driver
);
if
(
ret
==
0
)
ret
=
err
;
}
#endif
#endif
return
0
;
return
ret
;
}
}
static
void
__exit
el3_cleanup_module
(
void
)
static
void
__exit
el3_cleanup_module
(
void
)
...
...
drivers/net/Kconfig
View file @
ed071adc
...
@@ -1087,7 +1087,8 @@ config NE2000
...
@@ -1087,7 +1087,8 @@ config NE2000
without a specific driver are compatible with NE2000.
without a specific driver are compatible with NE2000.
If you have a PCI NE2000 card however, say N here and Y to "PCI
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
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",
laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
below.
below.
...
...
drivers/net/de620.c
View file @
ed071adc
...
@@ -1012,7 +1012,7 @@ static int __init read_eeprom(struct net_device *dev)
...
@@ -1012,7 +1012,7 @@ static int __init read_eeprom(struct net_device *dev)
#ifdef MODULE
#ifdef MODULE
static
struct
net_device
*
de620_dev
;
static
struct
net_device
*
de620_dev
;
int
init_module
(
void
)
int
__init
init_module
(
void
)
{
{
de620_dev
=
de620_probe
(
-
1
);
de620_dev
=
de620_probe
(
-
1
);
if
(
IS_ERR
(
de620_dev
))
if
(
IS_ERR
(
de620_dev
))
...
...
drivers/net/dl2k.c
View file @
ed071adc
...
@@ -50,8 +50,8 @@
...
@@ -50,8 +50,8 @@
*/
*/
#define DRV_NAME "D-Link DL2000-based linux driver"
#define DRV_NAME "D-Link DL2000-based linux driver"
#define DRV_VERSION "v1.17
a
"
#define DRV_VERSION "v1.17
b
"
#define DRV_RELDATE "200
2/10/04
"
#define DRV_RELDATE "200
6/03/10
"
#include "dl2k.h"
#include "dl2k.h"
static
char
version
[]
__devinitdata
=
static
char
version
[]
__devinitdata
=
...
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq)
...
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq)
break
;
break
;
skb
=
np
->
tx_skbuff
[
entry
];
skb
=
np
->
tx_skbuff
[
entry
];
pci_unmap_single
(
np
->
pdev
,
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
entry
].
fraginfo
,
np
->
tx_ring
[
entry
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_TODEVICE
);
skb
->
len
,
PCI_DMA_TODEVICE
);
if
(
irq
)
if
(
irq
)
dev_kfree_skb_irq
(
skb
);
dev_kfree_skb_irq
(
skb
);
...
@@ -892,14 +892,16 @@ receive_packet (struct net_device *dev)
...
@@ -892,14 +892,16 @@ receive_packet (struct net_device *dev)
/* Small skbuffs for short packets */
/* Small skbuffs for short packets */
if
(
pkt_len
>
copy_thresh
)
{
if
(
pkt_len
>
copy_thresh
)
{
pci_unmap_single
(
np
->
pdev
,
desc
->
fraginfo
,
pci_unmap_single
(
np
->
pdev
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
PCI_DMA_FROMDEVICE
);
skb_put
(
skb
=
np
->
rx_skbuff
[
entry
],
pkt_len
);
skb_put
(
skb
=
np
->
rx_skbuff
[
entry
],
pkt_len
);
np
->
rx_skbuff
[
entry
]
=
NULL
;
np
->
rx_skbuff
[
entry
]
=
NULL
;
}
else
if
((
skb
=
dev_alloc_skb
(
pkt_len
+
2
))
!=
NULL
)
{
}
else
if
((
skb
=
dev_alloc_skb
(
pkt_len
+
2
))
!=
NULL
)
{
pci_dma_sync_single_for_cpu
(
np
->
pdev
,
pci_dma_sync_single_for_cpu
(
np
->
pdev
,
desc
->
fraginfo
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
PCI_DMA_FROMDEVICE
);
skb
->
dev
=
dev
;
skb
->
dev
=
dev
;
...
@@ -910,7 +912,8 @@ receive_packet (struct net_device *dev)
...
@@ -910,7 +912,8 @@ receive_packet (struct net_device *dev)
pkt_len
,
0
);
pkt_len
,
0
);
skb_put
(
skb
,
pkt_len
);
skb_put
(
skb
,
pkt_len
);
pci_dma_sync_single_for_device
(
np
->
pdev
,
pci_dma_sync_single_for_device
(
np
->
pdev
,
desc
->
fraginfo
,
desc
->
fraginfo
&
0xffffffffffff
,
np
->
rx_buf_sz
,
np
->
rx_buf_sz
,
PCI_DMA_FROMDEVICE
);
PCI_DMA_FROMDEVICE
);
}
}
...
@@ -1796,7 +1799,8 @@ rio_close (struct net_device *dev)
...
@@ -1796,7 +1799,8 @@ rio_close (struct net_device *dev)
np
->
rx_ring
[
i
].
fraginfo
=
0
;
np
->
rx_ring
[
i
].
fraginfo
=
0
;
skb
=
np
->
rx_skbuff
[
i
];
skb
=
np
->
rx_skbuff
[
i
];
if
(
skb
)
{
if
(
skb
)
{
pci_unmap_single
(
np
->
pdev
,
np
->
rx_ring
[
i
].
fraginfo
,
pci_unmap_single
(
np
->
pdev
,
np
->
rx_ring
[
i
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_FROMDEVICE
);
skb
->
len
,
PCI_DMA_FROMDEVICE
);
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
np
->
rx_skbuff
[
i
]
=
NULL
;
np
->
rx_skbuff
[
i
]
=
NULL
;
...
@@ -1805,7 +1809,8 @@ rio_close (struct net_device *dev)
...
@@ -1805,7 +1809,8 @@ rio_close (struct net_device *dev)
for
(
i
=
0
;
i
<
TX_RING_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
TX_RING_SIZE
;
i
++
)
{
skb
=
np
->
tx_skbuff
[
i
];
skb
=
np
->
tx_skbuff
[
i
];
if
(
skb
)
{
if
(
skb
)
{
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
i
].
fraginfo
,
pci_unmap_single
(
np
->
pdev
,
np
->
tx_ring
[
i
].
fraginfo
&
0xffffffffffff
,
skb
->
len
,
PCI_DMA_TODEVICE
);
skb
->
len
,
PCI_DMA_TODEVICE
);
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
np
->
tx_skbuff
[
i
]
=
NULL
;
np
->
tx_skbuff
[
i
]
=
NULL
;
...
...
drivers/net/e1000/e1000_main.c
View file @
ed071adc
...
@@ -2917,7 +2917,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
...
@@ -2917,7 +2917,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
if
(
!
__pskb_pull_tail
(
skb
,
pull_size
))
{
if
(
!
__pskb_pull_tail
(
skb
,
pull_size
))
{
printk
(
KERN_ERR
"__pskb_pull_tail failed.
\n
"
);
printk
(
KERN_ERR
"__pskb_pull_tail failed.
\n
"
);
dev_kfree_skb_any
(
skb
);
dev_kfree_skb_any
(
skb
);
return
-
EFAULT
;
return
NETDEV_TX_OK
;
}
}
len
=
skb
->
len
-
skb
->
data_len
;
len
=
skb
->
len
-
skb
->
data_len
;
}
}
...
...
drivers/net/sky2.c
View file @
ed071adc
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
#define TX_RING_SIZE 512
#define TX_RING_SIZE 512
#define TX_DEF_PENDING (TX_RING_SIZE - 1)
#define TX_DEF_PENDING (TX_RING_SIZE - 1)
#define TX_MIN_PENDING 64
#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_RING_SIZE 2048
/* 2 ports * (TX + 2*RX) */
#define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le))
#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)
...
@@ -622,8 +622,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
/* Configure Rx MAC FIFO */
/* Configure Rx MAC FIFO */
sky2_write8
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_RST_CLR
);
sky2_write8
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_RST_CLR
);
sky2_write
16
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
sky2_write
32
(
hw
,
SK_REG
(
port
,
RX_GMF_CTRL_T
),
GMF_
RX_CTRL_DEF
);
GMF_
OPER_ON
|
GMF_RX_F_FL_ON
);
/* Flush Rx MAC FIFO on any flow control or error */
/* Flush Rx MAC FIFO on any flow control or error */
sky2_write16
(
hw
,
SK_REG
(
port
,
RX_GMF_FL_MSK
),
GMR_FS_ANY_ERR
);
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)
...
@@ -995,6 +995,10 @@ static int sky2_rx_start(struct sky2_port *sky2)
sky2_rx_add
(
sky2
,
re
->
mapaddr
);
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 */
/* Tell chip about available buffers */
sky2_write16
(
hw
,
Y2_QADDR
(
rxq
,
PREF_UNIT_PUT_IDX
),
sky2
->
rx_put
);
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
));
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)
...
@@ -1145,6 +1149,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
struct
sky2_tx_le
*
le
=
NULL
;
struct
sky2_tx_le
*
le
=
NULL
;
struct
tx_ring_info
*
re
;
struct
tx_ring_info
*
re
;
unsigned
i
,
len
;
unsigned
i
,
len
;
int
avail
;
dma_addr_t
mapping
;
dma_addr_t
mapping
;
u32
addr64
;
u32
addr64
;
u16
mss
;
u16
mss
;
...
@@ -1287,12 +1292,16 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
...
@@ -1287,12 +1292,16 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
re
->
idx
=
sky2
->
tx_prod
;
re
->
idx
=
sky2
->
tx_prod
;
le
->
ctrl
|=
EOP
;
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_put_idx
(
hw
,
txqaddr
[
sky2
->
port
],
sky2
->
tx_prod
,
&
sky2
->
tx_last_put
,
TX_RING_SIZE
);
&
sky2
->
tx_last_put
,
TX_RING_SIZE
);
if
(
tx_avail
(
sky2
)
<=
MAX_SKB_TX_LE
)
netif_stop_queue
(
dev
);
out_unlock:
out_unlock:
spin_unlock
(
&
sky2
->
tx_lock
);
spin_unlock
(
&
sky2
->
tx_lock
);
...
@@ -1707,10 +1716,12 @@ static void sky2_tx_timeout(struct net_device *dev)
...
@@ -1707,10 +1716,12 @@ static void sky2_tx_timeout(struct net_device *dev)
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
#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
)
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
)
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,
...
@@ -1793,7 +1804,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2,
if
(
!
(
status
&
GMR_FS_RX_OK
))
if
(
!
(
status
&
GMR_FS_RX_OK
))
goto
resubmit
;
goto
resubmit
;
if
(
(
status
>>
16
)
!=
length
||
length
>
sky2
->
rx_bufsize
)
if
(
length
>
sky2
->
netdev
->
mtu
+
ETH_HLEN
)
goto
oversize
;
goto
oversize
;
if
(
length
<
copybreak
)
{
if
(
length
<
copybreak
)
{
...
@@ -3243,8 +3254,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
...
@@ -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
,
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
,
DRV_NAME
,
hw
);
DRV_NAME
,
hw
);
if
(
err
)
{
if
(
err
)
{
printk
(
KERN_ERR
PFX
"%s: cannot assign irq %d
\n
"
,
printk
(
KERN_ERR
PFX
"%s: cannot assign irq %d
\n
"
,
pci_name
(
pdev
),
pdev
->
irq
);
pci_name
(
pdev
),
pdev
->
irq
);
...
...
drivers/net/tulip/de2104x.c
View file @
ed071adc
...
@@ -1362,7 +1362,6 @@ static int de_open (struct net_device *dev)
...
@@ -1362,7 +1362,6 @@ static int de_open (struct net_device *dev)
{
{
struct
de_private
*
de
=
dev
->
priv
;
struct
de_private
*
de
=
dev
->
priv
;
int
rc
;
int
rc
;
unsigned
long
flags
;
if
(
netif_msg_ifup
(
de
))
if
(
netif_msg_ifup
(
de
))
printk
(
KERN_DEBUG
"%s: enabling interface
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: enabling interface
\n
"
,
dev
->
name
);
...
@@ -1376,18 +1375,20 @@ static int de_open (struct net_device *dev)
...
@@ -1376,18 +1375,20 @@ static int de_open (struct net_device *dev)
return
rc
;
return
rc
;
}
}
rc
=
de_init_hw
(
de
);
dw32
(
IntrMask
,
0
);
if
(
rc
)
{
printk
(
KERN_ERR
"%s: h/w init failure, err=%d
\n
"
,
dev
->
name
,
rc
);
goto
err_out_free
;
}
rc
=
request_irq
(
dev
->
irq
,
de_interrupt
,
SA_SHIRQ
,
dev
->
name
,
dev
);
rc
=
request_irq
(
dev
->
irq
,
de_interrupt
,
SA_SHIRQ
,
dev
->
name
,
dev
);
if
(
rc
)
{
if
(
rc
)
{
printk
(
KERN_ERR
"%s: IRQ %d request failure, err=%d
\n
"
,
printk
(
KERN_ERR
"%s: IRQ %d request failure, err=%d
\n
"
,
dev
->
name
,
dev
->
irq
,
rc
);
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
);
netif_start_queue
(
dev
);
...
@@ -1395,11 +1396,8 @@ static int de_open (struct net_device *dev)
...
@@ -1395,11 +1396,8 @@ static int de_open (struct net_device *dev)
return
0
;
return
0
;
err_out_hw:
err_out_free_irq:
spin_lock_irqsave
(
&
de
->
lock
,
flags
);
free_irq
(
dev
->
irq
,
dev
);
de_stop_hw
(
de
);
spin_unlock_irqrestore
(
&
de
->
lock
,
flags
);
err_out_free:
err_out_free:
de_free_rings
(
de
);
de_free_rings
(
de
);
return
rc
;
return
rc
;
...
@@ -1455,6 +1453,8 @@ static void de_tx_timeout (struct net_device *dev)
...
@@ -1455,6 +1453,8 @@ static void de_tx_timeout (struct net_device *dev)
synchronize_irq
(
dev
->
irq
);
synchronize_irq
(
dev
->
irq
);
de_clean_rings
(
de
);
de_clean_rings
(
de
);
de_init_rings
(
de
);
de_init_hw
(
de
);
de_init_hw
(
de
);
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment