Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932864AbdIHNVn (ORCPT ); Fri, 8 Sep 2017 09:21:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35362 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932381AbdIHNVk (ORCPT ); Fri, 8 Sep 2017 09:21:40 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Loy , Christoph Hellwig , Tejun Heo Subject: [PATCH 4.13 41/47] ahci: dont use MSI for devices with the silly Intel NVMe remapping scheme Date: Fri, 8 Sep 2017 15:19:13 +0200 Message-Id: <20170908131825.387727081@linuxfoundation.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170908131823.546721606@linuxfoundation.org> References: <20170908131823.546721606@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1303 Lines: 41 4.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit f723fa4e69920f6a5dd5fa0d10ce90e2f14d189c upstream. Intel AHCI controllers that also hide NVMe devices in their bar can't use MSI interrupts, so disable them. Reported-by: John Loy Tested-by: John Loy Signed-off-by: Christoph Hellwig Fixes: d684a90d38e2 ("ahci: per-port msix support") Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- drivers/ata/ahci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1469,7 +1469,14 @@ static void ahci_remap_check(struct pci_ 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)