diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-10-24 21:05:11 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-10-24 21:05:11 +0000 |
commit | fd24d8ad40593cf260b24d82e66636e78182ac51 (patch) | |
tree | 959c665a1fc6de8aa952c0732f62809ea936bffb /sys | |
parent | 1f88e16cd9e54cad0c084791b9f9d2b47ec08e18 (diff) |
Duh, C_WAIT will always be set if the card is inactive, but that interrupt
isn't always enabled. (CSR & IER) == 0, means not to claim the intr.
deraadt ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/hifn7751.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c index d97922263a6..a64fd7a0d96 100644 --- a/sys/dev/pci/hifn7751.c +++ b/sys/dev/pci/hifn7751.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hifn7751.c,v 1.49 2000/10/23 21:22:42 deraadt Exp $ */ +/* $OpenBSD: hifn7751.c,v 1.50 2000/10/24 21:05:10 jason Exp $ */ /* * Invertex AEON / Hi/fn 7751 driver @@ -1029,10 +1029,12 @@ hifn_intr(arg) { struct hifn_softc *sc = arg; struct hifn_dma *dma = sc->sc_dma; - u_int32_t dmacsr; + u_int32_t dmacsr, dmaier; int i, u; dmacsr = READ_REG_1(sc, HIFN_1_DMA_CSR); + dmaier = READ_REG_1(sc, HIFN_1_DMA_IER) & + (HIFN_DMAIER_R_DONE | HIFN_DMAIER_C_WAIT); #ifdef HIFN_DEBUG printf("%s: irq: stat %08x ien %08x u %d/%d/%d/%d\n", @@ -1041,7 +1043,8 @@ hifn_intr(arg) dma->cmdu, dma->srcu, dma->dstu, dma->resu); #endif - if ((dmacsr & (HIFN_DMACSR_R_DONE | HIFN_DMACSR_C_WAIT)) == 0) + /* Nothing in the DMA unit interrupted */ + if ((dmacsr & dmaier) == 0) return (0); if (dma->resu > HIFN_D_RES_RSIZE) |