ixgbe: disable MSI-X by default on certain Cisco adapters
authorNicholas Nunley <nicholasx.d.nunley@intel.com>
Wed, 28 Apr 2010 02:47:49 +0000 (19:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Apr 2010 02:47:49 +0000 (19:47 -0700)
Due to an errata in 82598 parts MSI-X needs to be disabled
in certain ixgbe devices designed to transfer peer-to-peer
traffic on the PCIe bus. This patch sets the default
interrupt type to MSI rather than MSI-X for specific Cisco
ixgbe adapters.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Acked-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe.h
drivers/net/ixgbe/ixgbe_main.c

index 79c35ae3718c96186898452e286d59d5e0482814..ec6bcc0660c6e55fd26a6c81b4bb1979480664aa 100644 (file)
 #define MAX_EMULATION_MAC_ADDRS         16
 #define VMDQ_P(p)   ((p) + adapter->num_vfs)
 
+#define IXGBE_SUBDEV_ID_82598AF_MEZZ           0x0049
+#define IXGBE_SUBDEV_ID_82598AF_MENLO_Q_MEZZ   0x004a
+#define IXGBE_SUBDEV_ID_82598AF_MENLO_E_MEZZ   0x004b
+
 struct vf_data_storage {
        unsigned char vf_mac_addresses[ETH_ALEN];
        u16 vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES];
index 2ae5a5159ce4cf7e908c855c4463772ece65e0cd..ff59f88dc7a14ec0fa82703b740274696c4a6196 100644 (file)
@@ -4314,6 +4314,9 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
        int err = 0;
        int vector, v_budget;
 
+       if (!(adapter->flags & IXGBE_FLAG_MSIX_CAPABLE))
+               goto try_msi;
+
        /*
         * It's easy to be greedy for MSI-X vectors, but it really
         * doesn't do us much good if we have a lot more vectors
@@ -4345,7 +4348,7 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
                if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED)
                        goto out;
        }
-
+try_msi:
        adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
        adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
        adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
@@ -4626,6 +4629,18 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
        adapter->ring_feature[RING_F_RSS].indices = rss;
        adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
        adapter->ring_feature[RING_F_DCB].indices = IXGBE_MAX_DCB_INDICES;
+       adapter->flags |= IXGBE_FLAG_MSIX_CAPABLE;
+       if (adapter->hw.device_id == IXGBE_DEV_ID_82598AF_DUAL_PORT) {
+               switch (adapter->hw.subsystem_device_id) {
+               case IXGBE_SUBDEV_ID_82598AF_MEZZ:
+               case IXGBE_SUBDEV_ID_82598AF_MENLO_Q_MEZZ:
+               case IXGBE_SUBDEV_ID_82598AF_MENLO_E_MEZZ:
+                       adapter->flags &= ~IXGBE_FLAG_MSIX_CAPABLE;
+                       break;
+               default:
+                       break;
+               }
+       }
        if (hw->mac.type == ixgbe_mac_82598EB) {
                if (hw->device_id == IXGBE_DEV_ID_82598AT)
                        adapter->flags |= IXGBE_FLAG_FAN_FAIL_CAPABLE;