diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-09-27 15:38:12 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-09-27 23:32:29 -0400 |
commit | 88f5f0cad396be594d6d55cb2d0cd69e8df9ab16 (patch) | |
tree | 3520aeaa3d1b75d0adcb667a351ca5a30b8549af /drivers/net/sky2.c | |
parent | d6c9bc1ed4301cbc3df4565ff5348b64bf2a767c (diff) |
sky2: fix transmit state on resume
This should fix http://bugzilla.kernel.org/show_bug.cgi?id=8667
After resume, driver has reset the chip so the current state
of transmit checksum offload state machine and DMA state machine
will be undefined.
The fix is to set the state so that first Tx will set MSS and offset
values.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3bfc9d3e3c6e..162489b9f599 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -910,6 +910,20 @@ static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2) | |||
910 | return le; | 910 | return le; |
911 | } | 911 | } |
912 | 912 | ||
913 | static void tx_init(struct sky2_port *sky2) | ||
914 | { | ||
915 | struct sky2_tx_le *le; | ||
916 | |||
917 | sky2->tx_prod = sky2->tx_cons = 0; | ||
918 | sky2->tx_tcpsum = 0; | ||
919 | sky2->tx_last_mss = 0; | ||
920 | |||
921 | le = get_tx_le(sky2); | ||
922 | le->addr = 0; | ||
923 | le->opcode = OP_ADDR64 | HW_OWNER; | ||
924 | sky2->tx_addr64 = 0; | ||
925 | } | ||
926 | |||
913 | static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, | 927 | static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, |
914 | struct sky2_tx_le *le) | 928 | struct sky2_tx_le *le) |
915 | { | 929 | { |
@@ -1320,7 +1334,8 @@ static int sky2_up(struct net_device *dev) | |||
1320 | GFP_KERNEL); | 1334 | GFP_KERNEL); |
1321 | if (!sky2->tx_ring) | 1335 | if (!sky2->tx_ring) |
1322 | goto err_out; | 1336 | goto err_out; |
1323 | sky2->tx_prod = sky2->tx_cons = 0; | 1337 | |
1338 | tx_init(sky2); | ||
1324 | 1339 | ||
1325 | sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, | 1340 | sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, |
1326 | &sky2->rx_le_map); | 1341 | &sky2->rx_le_map); |