summaryrefslogtreecommitdiffstats
path: root/sys/dev/ahci
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-12-21 21:27:56 +0000
committermav <mav@FreeBSD.org>2009-12-21 21:27:56 +0000
commitc73145e084c3b5452c39a652bea5bde63d8d35f2 (patch)
tree54c264917e651e03b7092d26414c6debb6512082 /sys/dev/ahci
parentb12b4cb50e5c190969b2c6f79e55b8537acd132f (diff)
downloadFreeBSD-src-c73145e084c3b5452c39a652bea5bde63d8d35f2.zip
FreeBSD-src-c73145e084c3b5452c39a652bea5bde63d8d35f2.tar.gz
Clear all ports interrupt status bits in single write. Clearing one by one
causes additional MSIs messages sent if several ports asked for attention same time. Time window before clearing is not important, as these interrupts are level triggered by interrupt source.
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r--sys/dev/ahci/ahci.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 84a1630..632a121 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -596,20 +596,18 @@ ahci_intr(void *data)
unit = irq->r_irq_rid - 1;
is = ATA_INL(ctlr->r_mem, AHCI_IS);
}
+ /* Some controllers have edge triggered IS. */
+ if (ctlr->quirks & AHCI_Q_EDGEIS)
+ ATA_OUTL(ctlr->r_mem, AHCI_IS, is);
for (; unit < ctlr->channels; unit++) {
if ((is & (1 << unit)) != 0 &&
(arg = ctlr->interrupt[unit].argument)) {
- if (ctlr->quirks & AHCI_Q_EDGEIS) {
- /* Some controller have edge triggered IS. */
- ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
ctlr->interrupt[unit].function(arg);
- } else {
- /* but AHCI declares level triggered IS. */
- ctlr->interrupt[unit].function(arg);
- ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
- }
}
}
+ /* AHCI declares level triggered IS. */
+ if (!(ctlr->quirks & AHCI_Q_EDGEIS))
+ ATA_OUTL(ctlr->r_mem, AHCI_IS, is);
}
/*
OpenPOWER on IntegriCloud