This is a fairly conservative diff that enables MSI on the newer em(4)
parts, essentially everything handled by the Linux e1000e driver.

Please test if you have anything that's vaguely recent.


Index: if_em.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.257
diff -u -p -r1.257 if_em.c
--- if_em.c     3 Jun 2011 13:06:06 -0000       1.257
+++ if_em.c     15 Jun 2011 13:02:14 -0000
@@ -329,6 +329,10 @@ em_attach(struct device *parent, struct 
        /* Determine hardware revision */
        em_identify_hardware(sc);
 
+       /* Only use MSIe on the newer PCIe parts */
+       if (sc->hw.mac_type < em_82571)
+               pa->pa_flags &= ~PCI_FLAGS_MSI_ENABLED;
+
        /* Parameters (to be read from user) */
        if (sc->hw.mac_type >= em_82544) {
                sc->num_tx_desc = EM_MAX_TXD;
@@ -1615,7 +1619,7 @@ em_allocate_pci_resources(struct em_soft
                }
         }
 
-       if (pci_intr_map(pa, &ih)) {
+       if (pci_intr_map_msi(pa, &ih) && pci_intr_map(pa, &ih)) {
                printf(": couldn't map interrupt\n");
                return (ENXIO);
        }

Reply via email to