Setup our interrupt only at the end of fxp_attach(), when all
other allocations/initializations have been successful. I kinda doubt it will fix the recent breakage that some people are seeing, but this could have caused problems for sure.
This commit is contained in:
parent
fd6d48b8e8
commit
201afb0e56
@ -460,13 +460,6 @@ fxp_attach(device_t dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
|
||||
fxp_intr, sc, &sc->ih);
|
||||
if (error) {
|
||||
device_printf(dev, "could not setup irq\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset to a stable state.
|
||||
*/
|
||||
@ -770,11 +763,6 @@ fxp_attach(device_t dev)
|
||||
ifp->if_capenable = ifp->if_capabilities;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach the interface.
|
||||
*/
|
||||
ether_ifattach(ifp, sc->arpcom.ac_enaddr);
|
||||
|
||||
/*
|
||||
* Tell the upper layer(s) we support long frames.
|
||||
*/
|
||||
@ -787,6 +775,18 @@ fxp_attach(device_t dev)
|
||||
*/
|
||||
ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1;
|
||||
|
||||
/*
|
||||
* Attach the interface.
|
||||
*/
|
||||
ether_ifattach(ifp, sc->arpcom.ac_enaddr);
|
||||
|
||||
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
|
||||
fxp_intr, sc, &sc->ih);
|
||||
if (error) {
|
||||
device_printf(dev, "could not setup irq\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
splx(s);
|
||||
return (0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user