diff options
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r-- | drivers/net/b44.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 282ebd15f011..0ee3e27969c6 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/version.h> | 21 | #include <linux/version.h> |
22 | #include <linux/dma-mapping.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
@@ -1130,14 +1131,10 @@ static void b44_init_rings(struct b44 *bp) | |||
1130 | */ | 1131 | */ |
1131 | static void b44_free_consistent(struct b44 *bp) | 1132 | static void b44_free_consistent(struct b44 *bp) |
1132 | { | 1133 | { |
1133 | if (bp->rx_buffers) { | 1134 | kfree(bp->rx_buffers); |
1134 | kfree(bp->rx_buffers); | 1135 | bp->rx_buffers = NULL; |
1135 | bp->rx_buffers = NULL; | 1136 | kfree(bp->tx_buffers); |
1136 | } | 1137 | bp->tx_buffers = NULL; |
1137 | if (bp->tx_buffers) { | ||
1138 | kfree(bp->tx_buffers); | ||
1139 | bp->tx_buffers = NULL; | ||
1140 | } | ||
1141 | if (bp->rx_ring) { | 1138 | if (bp->rx_ring) { |
1142 | if (bp->flags & B44_FLAG_RX_RING_HACK) { | 1139 | if (bp->flags & B44_FLAG_RX_RING_HACK) { |
1143 | dma_unmap_single(&bp->pdev->dev, bp->rx_ring_dma, | 1140 | dma_unmap_single(&bp->pdev->dev, bp->rx_ring_dma, |
@@ -1619,14 +1616,14 @@ static int b44_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
1619 | 1616 | ||
1620 | cmd->advertising = 0; | 1617 | cmd->advertising = 0; |
1621 | if (bp->flags & B44_FLAG_ADV_10HALF) | 1618 | if (bp->flags & B44_FLAG_ADV_10HALF) |
1622 | cmd->advertising |= ADVERTISE_10HALF; | 1619 | cmd->advertising |= ADVERTISED_10baseT_Half; |
1623 | if (bp->flags & B44_FLAG_ADV_10FULL) | 1620 | if (bp->flags & B44_FLAG_ADV_10FULL) |
1624 | cmd->advertising |= ADVERTISE_10FULL; | 1621 | cmd->advertising |= ADVERTISED_10baseT_Full; |
1625 | if (bp->flags & B44_FLAG_ADV_100HALF) | 1622 | if (bp->flags & B44_FLAG_ADV_100HALF) |
1626 | cmd->advertising |= ADVERTISE_100HALF; | 1623 | cmd->advertising |= ADVERTISED_100baseT_Half; |
1627 | if (bp->flags & B44_FLAG_ADV_100FULL) | 1624 | if (bp->flags & B44_FLAG_ADV_100FULL) |
1628 | cmd->advertising |= ADVERTISE_100FULL; | 1625 | cmd->advertising |= ADVERTISED_100baseT_Full; |
1629 | cmd->advertising |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; | 1626 | cmd->advertising |= ADVERTISED_Pause | ADVERTISED_Asym_Pause; |
1630 | cmd->speed = (bp->flags & B44_FLAG_100_BASE_T) ? | 1627 | cmd->speed = (bp->flags & B44_FLAG_100_BASE_T) ? |
1631 | SPEED_100 : SPEED_10; | 1628 | SPEED_100 : SPEED_10; |
1632 | cmd->duplex = (bp->flags & B44_FLAG_FULL_DUPLEX) ? | 1629 | cmd->duplex = (bp->flags & B44_FLAG_FULL_DUPLEX) ? |
@@ -2044,6 +2041,8 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2044 | b44_free_rings(bp); | 2041 | b44_free_rings(bp); |
2045 | 2042 | ||
2046 | spin_unlock_irq(&bp->lock); | 2043 | spin_unlock_irq(&bp->lock); |
2044 | |||
2045 | free_irq(dev->irq, dev); | ||
2047 | pci_disable_device(pdev); | 2046 | pci_disable_device(pdev); |
2048 | return 0; | 2047 | return 0; |
2049 | } | 2048 | } |
@@ -2060,6 +2059,9 @@ static int b44_resume(struct pci_dev *pdev) | |||
2060 | if (!netif_running(dev)) | 2059 | if (!netif_running(dev)) |
2061 | return 0; | 2060 | return 0; |
2062 | 2061 | ||
2062 | if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev)) | ||
2063 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | ||
2064 | |||
2063 | spin_lock_irq(&bp->lock); | 2065 | spin_lock_irq(&bp->lock); |
2064 | 2066 | ||
2065 | b44_init_rings(bp); | 2067 | b44_init_rings(bp); |