Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2007 22:31:23 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 115376 for review
Message-ID:  <200703052231.l25MVN2x065803@repoman.freebsd.org>

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

Change 115376 by piso@piso_newluxor on 2007/03/05 22:30:51

	o Axe a bogus and redundant check.
	o Add a proper check for filter only handlers.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/puc/puc.c#12 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/puc/puc.c#12 (text+ko) ====

@@ -605,8 +605,11 @@
 	port = device_get_ivars(child);
 	KASSERT(port != NULL, ("%s %d", __func__, __LINE__));
 
-	if (filt == NULL || cookiep == NULL || res != port->p_ires)
+	if (cookiep == NULL || res != port->p_ires)
 		return (EINVAL);
+	/* We demand that serdev devices use filter_only interrupts. */
+	if (ihand != NULL)
+		return (ENXIO);
 	if (rman_get_device(port->p_ires) != originator)
 		return (ENXIO);
 
@@ -629,10 +632,6 @@
 		return (BUS_SETUP_INTR(device_get_parent(dev), originator,
 		    sc->sc_ires, flags, filt, ihand, arg, cookiep));
 
-	/* We demand that serdev devices use filter_only interrupts. */
-	if (filt != NULL)
-		return (ENXIO);
-
 	sc->sc_serdevs |= 1UL << (port->p_nr - 1);
 
 	port->p_hasintr = 1;



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