diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
commit | 9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch) | |
tree | 0be51b0bf02ece3bb32955e9d33a3998ecd57250 /drivers/net/sky2.c | |
parent | a4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff) | |
parent | fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff) | |
download | linux-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.bz2 |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index fecde669d6ab..a6ddfc1a9cb2 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1025,11 +1025,8 @@ static void sky2_prefetch_init(struct sky2_hw *hw, u32 qaddr, static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2, u16 *slot) { struct sky2_tx_le *le = sky2->tx_le + *slot; - struct tx_ring_info *re = sky2->tx_ring + *slot; *slot = RING_NEXT(*slot, sky2->tx_ring_size); - re->flags = 0; - re->skb = NULL; le->ctrl = 0; return le; } @@ -1622,8 +1619,7 @@ static unsigned tx_le_req(const struct sk_buff *skb) return count; } -static void sky2_tx_unmap(struct pci_dev *pdev, - const struct tx_ring_info *re) +static void sky2_tx_unmap(struct pci_dev *pdev, struct tx_ring_info *re) { if (re->flags & TX_MAP_SINGLE) pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr), @@ -1633,6 +1629,7 @@ static void sky2_tx_unmap(struct pci_dev *pdev, pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr), pci_unmap_len(re, maplen), PCI_DMA_TODEVICE); + re->flags = 0; } /* @@ -1839,6 +1836,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done) dev->stats.tx_packets++; dev->stats.tx_bytes += skb->len; + re->skb = NULL; dev_kfree_skb_any(skb); sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size); |