svn commit: r272606 - head/sys/dev/ahci
Alexander Motin
mav at FreeBSD.org
Mon Oct 6 10:58:55 UTC 2014
Author: mav
Date: Mon Oct 6 10:58:54 2014
New Revision: 272606
URL: https://svnweb.freebsd.org/changeset/base/272606
Log:
Use r271207 optimization only for MSI-enabled HBAs.
It was found that VirtualBox' AHCI does not allow nterrupt to be cleared
before the interrupt status register is read, causing interrupt storm.
AHCI specification allows to skip this register use when multi-vector MSI
is enabled and so interrupting port is known. For single-vector MSI that
is not stated explicitly, but if the port is only one, it is obviously
known too.
Modified:
head/sys/dev/ahci/ahci.c
Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c Mon Oct 6 09:52:28 2014 (r272605)
+++ head/sys/dev/ahci/ahci.c Mon Oct 6 10:58:54 2014 (r272606)
@@ -360,7 +360,7 @@ ahci_setup_interrupt(device_t dev)
for (i = 0; i < ctlr->numirqs; i++) {
ctlr->irqs[i].ctlr = ctlr;
ctlr->irqs[i].r_irq_rid = i + (ctlr->msi ? 1 : 0);
- if (ctlr->channels == 1 && !ctlr->ccc)
+ if (ctlr->channels == 1 && !ctlr->ccc && ctlr->msi)
ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE;
else if (ctlr->numirqs == 1 || i >= ctlr->channels ||
(ctlr->ccc && i == ctlr->cccv))
More information about the svn-src-all
mailing list