From: Christoph Hellwig Subject: [PATCH] ahci: don't use MSI for devices with the braindead Intel NVMe remapping scheme Date: Tue, 5 Sep 2017 18:46:47 +0200 Message-ID: <20170905164647.24101-1-hch@lst.de> Return-path: Received: from bombadil.infradead.org ([65.50.211.133]:59300 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbdIEQqz (ORCPT ); Tue, 5 Sep 2017 12:46:55 -0400 Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: tj@kernel.org Cc: dan.j.williams@intel.com, john.robert.loy@gmail.com, linux-ide@vger.kernel.org, stable@vger.kernel.org Intel AHCI controllers that also hide NVMe devices in their bar can't use MSI interrupts, so disable them. Reported-by: John Loy Testd-by: John Loy Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org --- drivers/ata/ahci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 5a5fd0b404eb..cb9b0e9090e3 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -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) -- 2.11.0