diff options
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r-- | drivers/net/3c59x.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 975e25b19ebe..5f92fdbe66e2 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -77,7 +77,6 @@ static int vortex_debug = 1; | |||
77 | #include <linux/errno.h> | 77 | #include <linux/errno.h> |
78 | #include <linux/in.h> | 78 | #include <linux/in.h> |
79 | #include <linux/ioport.h> | 79 | #include <linux/ioport.h> |
80 | #include <linux/slab.h> | ||
81 | #include <linux/interrupt.h> | 80 | #include <linux/interrupt.h> |
82 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
83 | #include <linux/mii.h> | 82 | #include <linux/mii.h> |
@@ -90,6 +89,7 @@ static int vortex_debug = 1; | |||
90 | #include <linux/eisa.h> | 89 | #include <linux/eisa.h> |
91 | #include <linux/bitops.h> | 90 | #include <linux/bitops.h> |
92 | #include <linux/jiffies.h> | 91 | #include <linux/jiffies.h> |
92 | #include <linux/gfp.h> | ||
93 | #include <asm/irq.h> /* For nr_irqs only. */ | 93 | #include <asm/irq.h> /* For nr_irqs only. */ |
94 | #include <asm/io.h> | 94 | #include <asm/io.h> |
95 | #include <asm/uaccess.h> | 95 | #include <asm/uaccess.h> |
@@ -375,7 +375,7 @@ static struct vortex_chip_info { | |||
375 | }; | 375 | }; |
376 | 376 | ||
377 | 377 | ||
378 | static struct pci_device_id vortex_pci_tbl[] = { | 378 | static DEFINE_PCI_DEVICE_TABLE(vortex_pci_tbl) = { |
379 | { 0x10B7, 0x5900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C590 }, | 379 | { 0x10B7, 0x5900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C590 }, |
380 | { 0x10B7, 0x5920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C592 }, | 380 | { 0x10B7, 0x5920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C592 }, |
381 | { 0x10B7, 0x5970, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C597 }, | 381 | { 0x10B7, 0x5970, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C597 }, |
@@ -837,7 +837,7 @@ static int vortex_resume(struct device *dev) | |||
837 | return 0; | 837 | return 0; |
838 | } | 838 | } |
839 | 839 | ||
840 | static struct dev_pm_ops vortex_pm_ops = { | 840 | static const struct dev_pm_ops vortex_pm_ops = { |
841 | .suspend = vortex_suspend, | 841 | .suspend = vortex_suspend, |
842 | .resume = vortex_resume, | 842 | .resume = vortex_resume, |
843 | .freeze = vortex_suspend, | 843 | .freeze = vortex_suspend, |
@@ -1942,8 +1942,8 @@ vortex_error(struct net_device *dev, int status) | |||
1942 | if (status & TxComplete) { /* Really "TxError" for us. */ | 1942 | if (status & TxComplete) { /* Really "TxError" for us. */ |
1943 | tx_status = ioread8(ioaddr + TxStatus); | 1943 | tx_status = ioread8(ioaddr + TxStatus); |
1944 | /* Presumably a tx-timeout. We must merely re-enable. */ | 1944 | /* Presumably a tx-timeout. We must merely re-enable. */ |
1945 | if (vortex_debug > 2 | 1945 | if (vortex_debug > 2 || |
1946 | || (tx_status != 0x88 && vortex_debug > 0)) { | 1946 | (tx_status != 0x88 && vortex_debug > 0)) { |
1947 | pr_err("%s: Transmit error, Tx status register %2.2x.\n", | 1947 | pr_err("%s: Transmit error, Tx status register %2.2x.\n", |
1948 | dev->name, tx_status); | 1948 | dev->name, tx_status); |
1949 | if (tx_status == 0x82) { | 1949 | if (tx_status == 0x82) { |
@@ -2560,7 +2560,7 @@ boomerang_rx(struct net_device *dev) | |||
2560 | struct sk_buff *skb; | 2560 | struct sk_buff *skb; |
2561 | entry = vp->dirty_rx % RX_RING_SIZE; | 2561 | entry = vp->dirty_rx % RX_RING_SIZE; |
2562 | if (vp->rx_skbuff[entry] == NULL) { | 2562 | if (vp->rx_skbuff[entry] == NULL) { |
2563 | skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN); | 2563 | skb = netdev_alloc_skb_ip_align(dev, PKT_BUF_SZ); |
2564 | if (skb == NULL) { | 2564 | if (skb == NULL) { |
2565 | static unsigned long last_jif; | 2565 | static unsigned long last_jif; |
2566 | if (time_after(jiffies, last_jif + 10 * HZ)) { | 2566 | if (time_after(jiffies, last_jif + 10 * HZ)) { |
@@ -2572,7 +2572,6 @@ boomerang_rx(struct net_device *dev) | |||
2572 | break; /* Bad news! */ | 2572 | break; /* Bad news! */ |
2573 | } | 2573 | } |
2574 | 2574 | ||
2575 | skb_reserve(skb, NET_IP_ALIGN); | ||
2576 | vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); | 2575 | vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); |
2577 | vp->rx_skbuff[entry] = skb; | 2576 | vp->rx_skbuff[entry] = skb; |
2578 | } | 2577 | } |
@@ -2971,7 +2970,7 @@ static void set_rx_mode(struct net_device *dev) | |||
2971 | if (vortex_debug > 3) | 2970 | if (vortex_debug > 3) |
2972 | pr_notice("%s: Setting promiscuous mode.\n", dev->name); | 2971 | pr_notice("%s: Setting promiscuous mode.\n", dev->name); |
2973 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; | 2972 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; |
2974 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { | 2973 | } else if (!netdev_mc_empty(dev) || dev->flags & IFF_ALLMULTI) { |
2975 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; | 2974 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; |
2976 | } else | 2975 | } else |
2977 | new_mode = SetRxFilter | RxStation | RxBroadcast; | 2976 | new_mode = SetRxFilter | RxStation | RxBroadcast; |