diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:17:34 -0400 |
commit | a1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch) | |
tree | c0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /drivers/net/amd8111e.c | |
parent | 275f165fa970174f8a98205529750e8abb6c0a33 (diff) | |
parent | a432226614c5616e3cfd211e0acffa0acfb4770c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'drivers/net/amd8111e.c')
-rw-r--r-- | drivers/net/amd8111e.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 20fcf0cdd801..4a2ef838fed6 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -644,10 +644,6 @@ This function frees the transmiter and receiver descriptor rings. | |||
644 | */ | 644 | */ |
645 | static void amd8111e_free_ring(struct amd8111e_priv* lp) | 645 | static void amd8111e_free_ring(struct amd8111e_priv* lp) |
646 | { | 646 | { |
647 | |||
648 | /* Free transmit and receive skbs */ | ||
649 | amd8111e_free_skbs(lp->amd8111e_net_dev); | ||
650 | |||
651 | /* Free transmit and receive descriptor rings */ | 647 | /* Free transmit and receive descriptor rings */ |
652 | if(lp->rx_ring){ | 648 | if(lp->rx_ring){ |
653 | pci_free_consistent(lp->pci_dev, | 649 | pci_free_consistent(lp->pci_dev, |
@@ -833,12 +829,14 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget) | |||
833 | 829 | ||
834 | } while(intr0 & RINT0); | 830 | } while(intr0 & RINT0); |
835 | 831 | ||
836 | /* Receive descriptor is empty now */ | 832 | if (rx_pkt_limit > 0) { |
837 | spin_lock_irqsave(&lp->lock, flags); | 833 | /* Receive descriptor is empty now */ |
838 | __netif_rx_complete(dev, napi); | 834 | spin_lock_irqsave(&lp->lock, flags); |
839 | writel(VAL0|RINTEN0, mmio + INTEN0); | 835 | __netif_rx_complete(dev, napi); |
840 | writel(VAL2 | RDMD0, mmio + CMD0); | 836 | writel(VAL0|RINTEN0, mmio + INTEN0); |
841 | spin_unlock_irqrestore(&lp->lock, flags); | 837 | writel(VAL2 | RDMD0, mmio + CMD0); |
838 | spin_unlock_irqrestore(&lp->lock, flags); | ||
839 | } | ||
842 | 840 | ||
843 | rx_not_empty: | 841 | rx_not_empty: |
844 | return num_rx_pkt; | 842 | return num_rx_pkt; |
@@ -1231,7 +1229,9 @@ static int amd8111e_close(struct net_device * dev) | |||
1231 | 1229 | ||
1232 | amd8111e_disable_interrupt(lp); | 1230 | amd8111e_disable_interrupt(lp); |
1233 | amd8111e_stop_chip(lp); | 1231 | amd8111e_stop_chip(lp); |
1234 | amd8111e_free_ring(lp); | 1232 | |
1233 | /* Free transmit and receive skbs */ | ||
1234 | amd8111e_free_skbs(lp->amd8111e_net_dev); | ||
1235 | 1235 | ||
1236 | netif_carrier_off(lp->amd8111e_net_dev); | 1236 | netif_carrier_off(lp->amd8111e_net_dev); |
1237 | 1237 | ||
@@ -1241,6 +1241,7 @@ static int amd8111e_close(struct net_device * dev) | |||
1241 | 1241 | ||
1242 | spin_unlock_irq(&lp->lock); | 1242 | spin_unlock_irq(&lp->lock); |
1243 | free_irq(dev->irq, dev); | 1243 | free_irq(dev->irq, dev); |
1244 | amd8111e_free_ring(lp); | ||
1244 | 1245 | ||
1245 | /* Update the statistics before closing */ | 1246 | /* Update the statistics before closing */ |
1246 | amd8111e_get_stats(dev); | 1247 | amd8111e_get_stats(dev); |