[rtems-libbsd commit] if_dwc: Move interrupt handler install

Sebastian Huber sebh at rtems.org
Wed Apr 1 07:16:38 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    d5ad68ab54d9aa8751895b7f44a88f5f2dad3ccd
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=d5ad68ab54d9aa8751895b7f44a88f5f2dad3ccd

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Mar 27 11:14:44 2015 +0100

if_dwc: Move interrupt handler install

---

 freebsd/sys/dev/dwc/if_dwc.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/freebsd/sys/dev/dwc/if_dwc.c b/freebsd/sys/dev/dwc/if_dwc.c
index 02f75a3..bd70dbf 100644
--- a/freebsd/sys/dev/dwc/if_dwc.c
+++ b/freebsd/sys/dev/dwc/if_dwc.c
@@ -1199,14 +1199,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);
 
@@ -1234,6 +1226,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;



More information about the vc mailing list