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>

authored by Stephen Hemminger and committed by Jeff Garzik 88f5f0ca d6c9bc1e

+16 -1
+16 -1
drivers/net/sky2.c
··· 910 return le; 911 } 912 913 static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, 914 struct sky2_tx_le *le) 915 { ··· 1334 GFP_KERNEL); 1335 if (!sky2->tx_ring) 1336 goto err_out; 1337 - sky2->tx_prod = sky2->tx_cons = 0; 1338 1339 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, 1340 &sky2->rx_le_map);
··· 910 return le; 911 } 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 + 927 static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2, 928 struct sky2_tx_le *le) 929 { ··· 1320 GFP_KERNEL); 1321 if (!sky2->tx_ring) 1322 goto err_out; 1323 + 1324 + tx_init(sky2); 1325 1326 sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES, 1327 &sky2->rx_le_map);