After installing kernel 4.9.0-rc5 x86_64 on a few different computers, it seems that Message-Signaled Interrupts are no longer being enabled for (at least) the AHCI controllers in Intel chipsets. With 4.8, MSI was enabled as it should be. With 4.9, legacy interrupts are used for the AHCI controllers in an Ivybridge laptop, a Broadwell NUC, a Skylake NUC, and a Skylake desktop. If I revert commit https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/ahci.c?h=v4.9-rc5&id=0b9e2988ab2261fd6d4a0039edf81ed1e3662be8 (along with https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/ahci.c?h=v4.9-rc5&id=17a51f12cfbd2814fd35966a069b242569c53e27, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/ahci.c?h=v4.9-rc5&id=a478b097474cd9f2268ab1beaca74ff09e652b9b, and https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/ahci.c?h=v4.9-rc5&id=0ce57f8af1782fd12d3a81872a4ab97244989802, which depend on it), the AHCI driver uses MSI interrupts correctly again.
Christoph, can you please take a look at this? Thanks!
On Thu, Nov 17, 2016 at 05:06:19PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=187821 > > --- Comment #1 from Tejun Heo <tj@kernel.org> --- > Christoph, can you please take a look at this? Thanks! The only sensible explanation would be that the multi-vector pci_alloc_irq_vectors returns something else than -ENOSPC. Please try the patch below, which I think would make sense anyway as robustness masure: diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9669fc7..74f4c66 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1436,13 +1436,6 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports, "ahci: MRSM is on, fallback to single MSI\n"); pci_free_irq_vectors(pdev); } - - /* - * -ENOSPC indicated we don't have enough vectors. Don't bother - * trying a single vectors for any other error: - */ - if (nvec < 0 && nvec != -ENOSPC) - return nvec; } /*
I applied the patch and I can confirm that it causes the AHCI driver to use MSI correctly. Thanks!
This was fixed at some point before the final 4.9 release.