Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2007 21:57:36 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 115368 for review
Message-ID:  <200703052157.l25LvarJ059246@repoman.freebsd.org>

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

Change 115368 by piso@piso_newluxor on 2007/03/05 21:56:49

	o Check for at least one handler among filt and ihand, else
	  return EINVAL.
	o Simplify a bit the filter handler wrapper, cause with the 
	  aforementioned check in place, we are sure there will always
	  be an ithread to run.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/pccbb/pccbb.c#13 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/pccbb/pccbb.c#13 (text+ko) ====

@@ -367,6 +367,8 @@
 	struct cbb_softc *sc = device_get_softc(dev);
 	int err;
 
+	if (filt == NULL && intr == NULL)
+		return (EINVAL);
 	/*
 	 * Well, this is no longer strictly true.  You can have multiple
 	 * FAST ISRs, but can't mix fast and slow, so we have to assume
@@ -636,12 +638,8 @@
 	 * in the ISR dispatch
 	 */
 	if (ih->filt != NULL)
-		return ((*ih->filt)(ih->arg));
-
-	if (ih->intr != NULL)
-		return (FILTER_HANDLED | FILTER_SCHEDULE_THREAD);
-	else
-		return (FILTER_STRAY);
+		return ((*ih->filt)(ih->arg));	
+	return (FILTER_HANDLED | FILTER_SCHEDULE_THREAD);
 }
 
 static void



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