diff options
author | 2002-03-01 20:01:35 +0000 | |
---|---|---|
committer | 2002-03-01 20:01:35 +0000 | |
commit | fd06e7bd59a762cc89e51aa07195f975af39079c (patch) | |
tree | ab58018df67c4d8b74099ae2bc141c362800358a | |
parent | Change a config(8) reference to a more appropriate boot_config(8) reference. (diff) | |
download | wireguard-openbsd-fd06e7bd59a762cc89e51aa07195f975af39079c.tar.xz wireguard-openbsd-fd06e7bd59a762cc89e51aa07195f975af39079c.zip |
From NetBSD, noticed by Alexander Yurchenko
"In hpt_pci_intr(): There is interrupt pending once IDEDMA_CTL_ACT is
turned off. It seems that IDEDMA_CTL_INTR is asserted before DMA transfer
is complete, leading to race condition in case of interrupt sharing.
Discovered reading the FreeBSD code."
-rw-r--r-- | sys/dev/pci/pciide.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index f875c3ad59f..b77fd0907c3 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.78 2002/02/16 08:18:57 chris Exp $ */ +/* $OpenBSD: pciide.c,v 1.79 2002/03/01 20:01:35 chris Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -3610,7 +3610,8 @@ hpt_pci_intr(arg) for (i = 0; i < sc->sc_wdcdev.nchannels; i++) { dmastat = bus_space_read_1(sc->sc_dma_iot, sc->sc_dma_ioh, IDEDMA_CTL + IDEDMA_SCH_OFFSET * i); - if ((dmastat & IDEDMA_CTL_INTR) == 0) + if((dmastat & ( IDEDMA_CTL_ACT | IDEDMA_CTL_INTR)) != + IDEDMA_CTL_INTR) continue; cp = &sc->pciide_channels[i]; wdc_cp = &cp->wdc_channel; |