igb: enable MSI-X for i354 on C2550 SoC
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 14 Jul 2014 09:59:34 +0000 (10:59 +0100)
committerAlex Hornung <alex@alexhornung.com>
Mon, 14 Jul 2014 09:59:34 +0000 (10:59 +0100)
sys/dev/netif/igb/if_igb.c
sys/dev/netif/igb/if_igb.h

index b6646a3..8e8ccb1 100644 (file)
@@ -4367,8 +4367,13 @@ igb_msix_try_alloc(struct igb_softc *sc)
        sc->msix_mem_res = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY,
            &sc->msix_mem_rid, RF_ACTIVE);
        if (sc->msix_mem_res == NULL) {
-               device_printf(sc->dev, "Unable to map MSI-X table\n");
-               return;
+               sc->msix_mem_rid = PCIR_BAR(IGB_MSIX_BAR_ALT);
+               sc->msix_mem_res = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY,
+                   &sc->msix_mem_rid, RF_ACTIVE);
+               if (sc->msix_mem_res == NULL) {
+                       device_printf(sc->dev, "Unable to map MSI-X table\n");
+                       return;
+               }
        }
 
        sc->msix_cnt = alloc_cnt;
index 1ec5701..1be6cd0 100644 (file)
 
 /* PCI Config defines */
 #define IGB_MSIX_BAR                   3
+#define IGB_MSIX_BAR_ALT               4
 
 #define IGB_MAX_SCATTER                        64
 #define IGB_VFTA_SIZE                  128