]> Pileus Git - ~andy/linux/blobdiff - drivers/net/sfc/efx.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[~andy/linux] / drivers / net / sfc / efx.c
index 46997e177ee3661fb6c1d0d57338d6b0268af4ee..649a264d6a81b80ee35f54850fce49a4545565c1 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/crc32.h>
 #include <linux/ethtool.h>
 #include <linux/topology.h>
+#include <linux/gfp.h>
 #include "net_driver.h"
 #include "efx.h"
 #include "mdio_10g.h"
@@ -1602,11 +1603,10 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
 static void efx_set_multicast_list(struct net_device *net_dev)
 {
        struct efx_nic *efx = netdev_priv(net_dev);
-       struct dev_mc_list *mc_list = net_dev->mc_list;
+       struct dev_mc_list *mc_list;
        union efx_multicast_hash *mc_hash = &efx->multicast_hash;
        u32 crc;
        int bit;
-       int i;
 
        efx->promiscuous = !!(net_dev->flags & IFF_PROMISC);
 
@@ -1615,11 +1615,10 @@ static void efx_set_multicast_list(struct net_device *net_dev)
                memset(mc_hash, 0xff, sizeof(*mc_hash));
        } else {
                memset(mc_hash, 0x00, sizeof(*mc_hash));
-               for (i = 0; i < net_dev->mc_count; i++) {
+               netdev_for_each_mc_addr(mc_list, net_dev) {
                        crc = ether_crc_le(ETH_ALEN, mc_list->dmi_addr);
                        bit = crc & (EFX_MCAST_HASH_ENTRIES - 1);
                        set_bit_le(bit, mc_hash->byte);
-                       mc_list = mc_list->next;
                }
 
                /* Broadcast packets go through the multicast hash filter.
@@ -1862,6 +1861,7 @@ out:
        }
 
        if (disabled) {
+               dev_close(efx->net_dev);
                EFX_ERR(efx, "has been disabled\n");
                efx->state = STATE_DISABLED;
        } else {
@@ -1885,8 +1885,7 @@ static void efx_reset_work(struct work_struct *data)
        }
 
        rtnl_lock();
-       if (efx_reset(efx, efx->reset_pending))
-               dev_close(efx->net_dev);
+       (void)efx_reset(efx, efx->reset_pending);
        rtnl_unlock();
 }
 
@@ -1940,7 +1939,7 @@ void efx_schedule_reset(struct efx_nic *efx, enum reset_type type)
  **************************************************************************/
 
 /* PCI device ID table */
-static struct pci_device_id efx_pci_table[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(efx_pci_table) = {
        {PCI_DEVICE(EFX_VENDID_SFC, FALCON_A_P_DEVID),
         .driver_data = (unsigned long) &falcon_a1_nic_type},
        {PCI_DEVICE(EFX_VENDID_SFC, FALCON_B_P_DEVID),