ahci: don't use MSI for devices with the silly Intel NVMe remapping scheme
authorChristoph Hellwig <hch@lst.de>
Tue, 5 Sep 2017 16:46:47 +0000 (18:46 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 6 Sep 2017 14:36:23 +0000 (07:36 -0700)
Intel AHCI controllers that also hide NVMe devices in their bar
can't use MSI interrupts, so disable them.

Reported-by: John Loy <john.robert.loy@gmail.com>
Tested-by: John Loy <john.robert.loy@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Fixes: d684a90d38e2 ("ahci: per-port msix support")
Cc: stable@vger.kernel.org # v4.5+
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c

index 5a5fd0b404eb8467b1b83bf04d9d6768cc9536c9..cb9b0e9090e3b8ec7e32fff751b1e34332cb7068 100644 (file)
@@ -1469,7 +1469,14 @@ static void ahci_remap_check(struct pci_dev *pdev, int bar,
                return;
 
        dev_warn(&pdev->dev, "Found %d remapped NVMe devices.\n", count);
-       dev_warn(&pdev->dev, "Switch your BIOS from RAID to AHCI mode to use them.\n");
+       dev_warn(&pdev->dev,
+                "Switch your BIOS from RAID to AHCI mode to use them.\n");
+
+       /*
+        * Don't rely on the msi-x capability in the remap case,
+        * share the legacy interrupt across ahci and remapped devices.
+        */
+       hpriv->flags |= AHCI_HFLAG_NO_MSI;
 }
 
 static int ahci_get_irq_vector(struct ata_host *host, int port)