PERFORCE change 115256 for review
Paolo Pisati
piso at FreeBSD.org
Fri Mar 2 17:32:22 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=115256
Change 115256 by piso at piso_newluxor on 2007/03/02 17:31:21
Restablish a filtered version of aac.
Affected files ...
.. //depot/projects/soc2006/intr_filter/dev/aac/aac.c#10 edit
.. //depot/projects/soc2006/intr_filter/dev/aac/aacvar.h#5 edit
Differences ...
==== //depot/projects/soc2006/intr_filter/dev/aac/aac.c#10 (text+ko) ====
@@ -307,18 +307,11 @@
}
} else {
if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
- INTR_TYPE_BIO, aac_fast_intr, NULL,
+ INTR_TYPE_BIO, aac_fast_intr, aac_complete,
sc, &sc->aac_intr)) {
device_printf(sc->aac_dev,
- "can't set up FAST interrupt\n");
- if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
- INTR_MPSAFE|INTR_TYPE_BIO,
- NULL, (driver_intr_t *)aac_fast_intr,
- sc, &sc->aac_intr)) {
- device_printf(sc->aac_dev,
- "can't set up MPSAFE interrupt\n");
+ "can't set up FILTERed interrupt\n");
return (EINVAL);
- }
}
}
@@ -820,53 +813,9 @@
*/
wakeup(sc->aifthread);
}
- return((ret)?ret:FILTER_STRAY);
+ return(ret ? ret : FILTER_STRAY);
}
-int
-aac_intr(void *arg)
-{
- struct aac_softc *sc;
- u_int16_t reason;
-
- debug_called(2);
-
- sc = (struct aac_softc *)arg;
-
- /*
- * Read the status register directly. This is faster than taking the
- * driver lock and reading the queues directly. It also saves having
- * to turn parts of the driver lock into a spin mutex, which would be
- * ugly.
- */
- reason = AAC_GET_ISTATUS(sc);
- AAC_CLEAR_ISTATUS(sc, reason);
-
- /* handle completion processing */
- if (reason & AAC_DB_RESPONSE_READY)
- taskqueue_enqueue_fast(taskqueue_fast, &sc->aac_task_complete);
-
- /* controller wants to talk to us */
- if (reason & (AAC_DB_PRINTF | AAC_DB_COMMAND_READY)) {
- /*
- * XXX Make sure that we don't get fooled by strange messages
- * that start with a NULL.
- */
- if ((reason & AAC_DB_PRINTF) &&
- (sc->aac_common->ac_printf[0] == 0))
- sc->aac_common->ac_printf[0] = 32;
-
- /*
- * This might miss doing the actual wakeup. However, the
- * msleep that this is waking up has a timeout, so it will
- * wake up eventually. AIFs and printfs are low enough
- * priority that they can handle hanging out for a few seconds
- * if needed.
- */
- wakeup(sc->aifthread);
- }
- return (FILTER_HANDLED);
-}
/*
* Command Processing
==== //depot/projects/soc2006/intr_filter/dev/aac/aacvar.h#5 (text+ko) ====
@@ -426,7 +426,6 @@
extern int aac_resume(device_t dev);
extern void aac_new_intr(void *arg);
extern int aac_fast_intr(void *arg);
-extern void aac_intr(void *arg);
extern void aac_submit_bio(struct bio *bp);
extern void aac_biodone(struct bio *bp);
extern void aac_startio(struct aac_softc *sc);
More information about the p4-projects
mailing list