summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-pci.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-12-05 13:40:51 +0000
committermav <mav@FreeBSD.org>2009-12-05 13:40:51 +0000
commita448ba25c9a177b54a3ea45390cf40ed5100ea63 (patch)
treef111fbeea2133ecfa170f28f2c44da52cc6e9d51 /sys/dev/ata/ata-pci.c
parentcd137e08f951f1d64599c526b61b2d2c4cede074 (diff)
downloadFreeBSD-src-a448ba25c9a177b54a3ea45390cf40ed5100ea63.zip
FreeBSD-src-a448ba25c9a177b54a3ea45390cf40ed5100ea63.tar.gz
Do not ignore device interrupt if bus mastering is still active. It is
normal in case of media read error and some ATAPI cases, when transfer size is unknown beforehand. PCI ATA BM specification tells that in case of such underrun driver should just manually stop DMA engine. DMA engine should same time guarantie that all bus mastering transfers completed at the moment of driver reads interrupt flag asserted. This change should fix interrupt storms and command timeouts in many cases. PR: kern/103602, sparc64/121539, kern/133122, kern/139654
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r--sys/dev/ata/ata-pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 4a24455..ce21926 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -462,8 +462,7 @@ ata_pci_status(device_t dev)
(ch->dma.flags & ATA_DMA_ACTIVE))) {
int bmstat = ATA_IDX_INB(ch, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
- if ((bmstat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) !=
- ATA_BMSTAT_INTERRUPT)
+ if ((bmstat & ATA_BMSTAT_INTERRUPT) == 0)
return 0;
ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, bmstat & ~ATA_BMSTAT_ERROR);
DELAY(1);
OpenPOWER on IntegriCloud