diff options
| author | Scott Long <scottl@FreeBSD.org> | 2008-08-02 13:04:26 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2008-08-02 13:04:26 +0000 |
| commit | 8792c6abd8eadf07bbb91042594cd4927f67c91b (patch) | |
| tree | f0ec10eaecba13372d823b4ddd207b94dfe5cb55 /sys/dev/ciss | |
| parent | 08cfba5d1493f6e71cba14a686cb208fb1f190e8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ciss')
| -rw-r--r-- | sys/dev/ciss/ciss.c | 4 | ||||
| -rw-r--r-- | sys/dev/ciss/cissreg.h | 22 |
2 files changed, 11 insertions, 15 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 58c590cdd624..9073e7b423f0 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -2028,10 +2028,6 @@ ciss_done(struct ciss_softc *sc, cr_qhead_t *qh) */ for (;;) { - /* see if the OPQ contains anything */ - if (!CISS_TL_SIMPLE_OPQ_INTERRUPT(sc)) - break; - tag = CISS_TL_SIMPLE_FETCH_CMD(sc); if (tag == CISS_TL_SIMPLE_OPQ_EMPTY) break; diff --git a/sys/dev/ciss/cissreg.h b/sys/dev/ciss/cissreg.h index 8909e9b76b07..982df2fa92c4 100644 --- a/sys/dev/ciss/cissreg.h +++ b/sys/dev/ciss/cissreg.h @@ -736,17 +736,17 @@ struct ciss_bmic_flush_cache { #define CISS_MSI_COUNT 4 /* - * XXX documentation conflicts with the Linux driver as to whether setting or clearing - * bits masks interrupts + * XXX Here we effectively trust the BIOS to set the IMR correctly. But if + * we don't trust it, will we get into trouble with wrongly assuming what it + * should be? */ -#define CISS_TL_SIMPLE_DISABLE_INTERRUPTS(sc) \ - CISS_TL_SIMPLE_WRITE(sc, CISS_TL_SIMPLE_IMR, \ - CISS_TL_SIMPLE_READ(sc, CISS_TL_SIMPLE_IMR) | (sc)->ciss_interrupt_mask) -#define CISS_TL_SIMPLE_ENABLE_INTERRUPTS(sc) \ - CISS_TL_SIMPLE_WRITE(sc, CISS_TL_SIMPLE_IMR, \ - CISS_TL_SIMPLE_READ(sc, CISS_TL_SIMPLE_IMR) & ~(sc)->ciss_interrupt_mask) - -#define CISS_TL_SIMPLE_OPQ_INTERRUPT(sc) \ - (CISS_TL_SIMPLE_READ(sc, CISS_TL_SIMPLE_ISR) & (sc)->ciss_interrupt_mask) +#define CISS_TL_SIMPLE_DISABLE_INTERRUPTS(sc) \ + do { \ + (sc)->ciss_interrupt_mask = \ + CISS_TL_SIMPLE_READ(sc, CISS_TL_SIMPLE_IMR); \ + CISS_TL_SIMPLE_WRITE(sc, CISS_TL_SIMPLE_IMR, ~0); \ + } while (0) +#define CISS_TL_SIMPLE_ENABLE_INTERRUPTS(sc) \ + CISS_TL_SIMPLE_WRITE(sc, CISS_TL_SIMPLE_IMR, (sc)->ciss_interrupt_mask) #endif /* _KERNEL */ |
