mxge: call bus_setup_intr() after the if serializer has been set
authorAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Mon, 13 Jul 2009 15:11:10 +0000 (18:11 +0300)
committerAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Mon, 13 Jul 2009 15:11:10 +0000 (18:11 +0300)
sys/dev/netif/mxge/if_mxge.c

index e0f80e0..82d966b 100644 (file)
@@ -4593,12 +4593,6 @@ mxge_attach(device_t dev)
                goto abort_with_dmabench;
        }
 
-       err = mxge_add_irq(sc);
-       if (err != 0) {
-               device_printf(sc->dev, "failed to add irq\n");
-               goto abort_with_rings;
-       }
-
        ifp->if_baudrate = IF_Gbps(10UL);
        ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4 |
                IFCAP_VLAN_MTU;
@@ -4640,6 +4634,12 @@ mxge_attach(device_t dev)
                mxge_change_mtu(sc, mxge_initial_mtu);
                lwkt_serialize_exit(ifp->if_serializer);
        }
+       /* must come after ether_ifattach() */
+       err = mxge_add_irq(sc);
+       if (err != 0) {
+               device_printf(sc->dev, "failed to add irq\n");
+               goto abort_with_rings;
+       }
 
        mxge_add_sysctls(sc);
 #ifdef IFNET_BUF_RING