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.
This commit is contained in:
parent
9677c48e30
commit
88971a900d
@ -360,7 +360,7 @@ ahci_setup_interrupt(device_t dev)
|
|||||||
for (i = 0; i < ctlr->numirqs; i++) {
|
for (i = 0; i < ctlr->numirqs; i++) {
|
||||||
ctlr->irqs[i].ctlr = ctlr;
|
ctlr->irqs[i].ctlr = ctlr;
|
||||||
ctlr->irqs[i].r_irq_rid = i + (ctlr->msi ? 1 : 0);
|
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;
|
ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE;
|
||||||
else if (ctlr->numirqs == 1 || i >= ctlr->channels ||
|
else if (ctlr->numirqs == 1 || i >= ctlr->channels ||
|
||||||
(ctlr->ccc && i == ctlr->cccv))
|
(ctlr->ccc && i == ctlr->cccv))
|
||||||
|
Loading…
Reference in New Issue
Block a user