]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/b44.c
[PATCH] bonding: fix feature consolidation
[linux-2.6-omap-h63xx.git] / drivers / net / b44.c
index 225d14fd9239f07e2ac438810494cde352d63086..0ee3e27969c6f921ad3dbfe990c48d62572996e9 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/version.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -1130,14 +1131,10 @@ static void b44_init_rings(struct b44 *bp)
  */
 static void b44_free_consistent(struct b44 *bp)
 {
-       if (bp->rx_buffers) {
-               kfree(bp->rx_buffers);
-               bp->rx_buffers = NULL;
-       }
-       if (bp->tx_buffers) {
-               kfree(bp->tx_buffers);
-               bp->tx_buffers = NULL;
-       }
+       kfree(bp->rx_buffers);
+       bp->rx_buffers = NULL;
+       kfree(bp->tx_buffers);
+       bp->tx_buffers = NULL;
        if (bp->rx_ring) {
                if (bp->flags & B44_FLAG_RX_RING_HACK) {
                        dma_unmap_single(&bp->pdev->dev, bp->rx_ring_dma,
@@ -2044,6 +2041,8 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state)
        b44_free_rings(bp);
 
        spin_unlock_irq(&bp->lock);
+
+       free_irq(dev->irq, dev);
        pci_disable_device(pdev);
        return 0;
 }
@@ -2060,6 +2059,9 @@ static int b44_resume(struct pci_dev *pdev)
        if (!netif_running(dev))
                return 0;
 
+       if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev))
+               printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
+
        spin_lock_irq(&bp->lock);
 
        b44_init_rings(bp);