Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2006 23:06:30 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111758 for review
Message-ID:  <200612152306.kBFN6Ux1067236@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111758

Change 111758 by piso@piso_newluxor on 2006/12/15 23:05:37

	Teach msk about new bus_setup_intr() API.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/msk/if_msk.c#2 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/msk/if_msk.c#2 (text+ko) ====

@@ -228,7 +228,7 @@
 static int msk_detach(device_t);
 
 static void msk_tick(void *);
-static void msk_intr(void *);
+static int msk_intr(void *);
 static void msk_int_task(void *, int);
 static void msk_intr_phy(struct msk_if_softc *);
 static void msk_intr_gmac(struct msk_if_softc *);
@@ -1771,7 +1771,7 @@
 	    device_get_nameunit(sc->msk_dev));
 	/* Hook interrupt last to avoid having to lock softc. */
 	error = bus_setup_intr(dev, sc->msk_res[1], INTR_TYPE_NET |
-	    INTR_MPSAFE | INTR_FAST, msk_intr, sc, &sc->msk_intrhand);
+	    INTR_MPSAFE, msk_intr, NULL, sc, &sc->msk_intrhand);
 
 	if (error != 0) {
 		device_printf(dev, "couldn't set up interrupt handler\n");
@@ -3465,7 +3465,7 @@
 	return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX));
 }
 
-static void
+static int
 msk_intr(void *xsc)
 {
 	struct msk_softc *sc;
@@ -3476,10 +3476,11 @@
 	/* Reading B0_Y2_SP_ISRC2 masks further interrupts. */
 	if (status == 0 || status == 0xffffffff) {
 		CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);
-		return;
+		return (FILTER_STRAY);
 	}
 
 	taskqueue_enqueue(sc->msk_tq, &sc->msk_int_task);
+	return (FILTER_HANDLED);
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612152306.kBFN6Ux1067236>