summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-27 11:14:44 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-10 09:53:33 +0100
commite392c989908ff3b0aeab509577bd03420edc6959 (patch)
tree62dbb2f939090c803a935922a24c183620a0a8e0
parentEnable multi-cast routing support (diff)
downloadrtems-libbsd-e392c989908ff3b0aeab509577bd03420edc6959.tar.bz2
if_dwc: Move interrupt handler install
-rw-r--r--freebsd/sys/dev/dwc/if_dwc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/freebsd/sys/dev/dwc/if_dwc.c b/freebsd/sys/dev/dwc/if_dwc.c
index c7284ee1..e76c49f6 100644
--- a/freebsd/sys/dev/dwc/if_dwc.c
+++ b/freebsd/sys/dev/dwc/if_dwc.c
@@ -1227,14 +1227,6 @@ dwc_attach(device_t dev)
callout_init_mtx(&sc->dwc_callout, &sc->mtx, 0);
- /* Setup interrupt handler. */
- error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE,
- NULL, dwc_intr, sc, &sc->intr_cookie);
- if (error != 0) {
- device_printf(dev, "could not setup interrupt handler.\n");
- return (ENXIO);
- }
-
/* Set up the ethernet interface. */
sc->ifp = ifp = if_alloc(IFT_ETHER);
@@ -1261,6 +1253,14 @@ dwc_attach(device_t dev)
}
sc->mii_softc = device_get_softc(sc->miibus);
+ /* Setup interrupt handler. */
+ error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE,
+ NULL, dwc_intr, sc, &sc->intr_cookie);
+ if (error != 0) {
+ device_printf(dev, "could not setup interrupt handler.\n");
+ return (ENXIO);
+ }
+
/* All ready to run, attach the ethernet interface. */
ether_ifattach(ifp, macaddr);
sc->is_attached = true;