diff options
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 3116601dbfea..5c98f7c22425 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <linux/init.h> | 59 | #include <linux/init.h> |
60 | #include <linux/if_vlan.h> | 60 | #include <linux/if_vlan.h> |
61 | #include <linux/dma-mapping.h> | 61 | #include <linux/dma-mapping.h> |
62 | #include <linux/slab.h> | ||
62 | 63 | ||
63 | #include <asm/irq.h> | 64 | #include <asm/irq.h> |
64 | #include <asm/io.h> | 65 | #include <asm/io.h> |
@@ -3095,7 +3096,7 @@ static void nv_set_multicast(struct net_device *dev) | |||
3095 | } else { | 3096 | } else { |
3096 | pff |= NVREG_PFF_MYADDR; | 3097 | pff |= NVREG_PFF_MYADDR; |
3097 | 3098 | ||
3098 | if (dev->flags & IFF_ALLMULTI || dev->mc_list) { | 3099 | if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) { |
3099 | u32 alwaysOff[2]; | 3100 | u32 alwaysOff[2]; |
3100 | u32 alwaysOn[2]; | 3101 | u32 alwaysOn[2]; |
3101 | 3102 | ||
@@ -3105,8 +3106,7 @@ static void nv_set_multicast(struct net_device *dev) | |||
3105 | } else { | 3106 | } else { |
3106 | struct dev_mc_list *walk; | 3107 | struct dev_mc_list *walk; |
3107 | 3108 | ||
3108 | walk = dev->mc_list; | 3109 | netdev_for_each_mc_addr(walk, dev) { |
3109 | while (walk != NULL) { | ||
3110 | u32 a, b; | 3110 | u32 a, b; |
3111 | a = le32_to_cpu(*(__le32 *) walk->dmi_addr); | 3111 | a = le32_to_cpu(*(__le32 *) walk->dmi_addr); |
3112 | b = le16_to_cpu(*(__le16 *) (&walk->dmi_addr[4])); | 3112 | b = le16_to_cpu(*(__le16 *) (&walk->dmi_addr[4])); |
@@ -3114,7 +3114,6 @@ static void nv_set_multicast(struct net_device *dev) | |||
3114 | alwaysOff[0] &= ~a; | 3114 | alwaysOff[0] &= ~a; |
3115 | alwaysOn[1] &= b; | 3115 | alwaysOn[1] &= b; |
3116 | alwaysOff[1] &= ~b; | 3116 | alwaysOff[1] &= ~b; |
3117 | walk = walk->next; | ||
3118 | } | 3117 | } |
3119 | } | 3118 | } |
3120 | addr[0] = alwaysOn[0]; | 3119 | addr[0] = alwaysOn[0]; |
@@ -4004,7 +4003,7 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
4004 | /* Request irq for rx handling */ | 4003 | /* Request irq for rx handling */ |
4005 | sprintf(np->name_rx, "%s-rx", dev->name); | 4004 | sprintf(np->name_rx, "%s-rx", dev->name); |
4006 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, | 4005 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, |
4007 | &nv_nic_irq_rx, IRQF_SHARED, np->name_rx, dev) != 0) { | 4006 | nv_nic_irq_rx, IRQF_SHARED, np->name_rx, dev) != 0) { |
4008 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); | 4007 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); |
4009 | pci_disable_msix(np->pci_dev); | 4008 | pci_disable_msix(np->pci_dev); |
4010 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 4009 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
@@ -4013,7 +4012,7 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
4013 | /* Request irq for tx handling */ | 4012 | /* Request irq for tx handling */ |
4014 | sprintf(np->name_tx, "%s-tx", dev->name); | 4013 | sprintf(np->name_tx, "%s-tx", dev->name); |
4015 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, | 4014 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, |
4016 | &nv_nic_irq_tx, IRQF_SHARED, np->name_tx, dev) != 0) { | 4015 | nv_nic_irq_tx, IRQF_SHARED, np->name_tx, dev) != 0) { |
4017 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); | 4016 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); |
4018 | pci_disable_msix(np->pci_dev); | 4017 | pci_disable_msix(np->pci_dev); |
4019 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 4018 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
@@ -4022,7 +4021,7 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
4022 | /* Request irq for link and timer handling */ | 4021 | /* Request irq for link and timer handling */ |
4023 | sprintf(np->name_other, "%s-other", dev->name); | 4022 | sprintf(np->name_other, "%s-other", dev->name); |
4024 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, | 4023 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, |
4025 | &nv_nic_irq_other, IRQF_SHARED, np->name_other, dev) != 0) { | 4024 | nv_nic_irq_other, IRQF_SHARED, np->name_other, dev) != 0) { |
4026 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); | 4025 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); |
4027 | pci_disable_msix(np->pci_dev); | 4026 | pci_disable_msix(np->pci_dev); |
4028 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 4027 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
@@ -5900,7 +5899,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5900 | /* Limit the number of tx's outstanding for hw bug */ | 5899 | /* Limit the number of tx's outstanding for hw bug */ |
5901 | if (id->driver_data & DEV_NEED_TX_LIMIT) { | 5900 | if (id->driver_data & DEV_NEED_TX_LIMIT) { |
5902 | np->tx_limit = 1; | 5901 | np->tx_limit = 1; |
5903 | if ((id->driver_data & DEV_NEED_TX_LIMIT2) && | 5902 | if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) && |
5904 | pci_dev->revision >= 0xA2) | 5903 | pci_dev->revision >= 0xA2) |
5905 | np->tx_limit = 0; | 5904 | np->tx_limit = 0; |
5906 | } | 5905 | } |
@@ -6198,7 +6197,7 @@ static void nv_shutdown(struct pci_dev *pdev) | |||
6198 | #define nv_resume NULL | 6197 | #define nv_resume NULL |
6199 | #endif /* CONFIG_PM */ | 6198 | #endif /* CONFIG_PM */ |
6200 | 6199 | ||
6201 | static struct pci_device_id pci_tbl[] = { | 6200 | static DEFINE_PCI_DEVICE_TABLE(pci_tbl) = { |
6202 | { /* nForce Ethernet Controller */ | 6201 | { /* nForce Ethernet Controller */ |
6203 | PCI_DEVICE(0x10DE, 0x01C3), | 6202 | PCI_DEVICE(0x10DE, 0x01C3), |
6204 | .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, | 6203 | .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, |