Date: Mon, 6 Oct 2014 10:58:54 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272606 - head/sys/dev/ahci Message-ID: <201410061058.s96Awstt007882@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410061058.s96Awstt007882>