From patchwork Tue Sep 5 16:46:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 810224 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="LlxBpSeW"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xmt0h4Znpz9sNr for ; Wed, 6 Sep 2017 02:47:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbdIEQq5 (ORCPT ); Tue, 5 Sep 2017 12:46:57 -0400 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XYqSRoNsQplznU1bPk+FP/BcwqD1vIhTQPUQFrRBYp4=; b=LlxBpSeWd2Gs1ZHwF+9r59+V/ OZak872qaTR4JYE5oIzhMyGWoi+tsPLe0x1atypj8RaT2lCDbD/c+8mzrbL+rrErvuq/x1s9D7pjr igUbo39b60JahIdeCX94E3ZJiUt5qtZ6i58Xj5lWSDm0xUUHOSmqWRc1Ivgzy68Y1ZlQjxlm80+Wa m7x454edSqe1xlkj5tXCn1qh2yvaJzatuhhpjGtBhDsH/UpZzYE5Rywn5DVfCMPlnay44LNU7Qgkz Vyhs1rlyEVLgiaFexTmqpUhfvy9onjfxsoxn9jcXl4eqRNY7eKcp+YcG7b7ZSlL1tlBTBerKL3jMq ijGh8ZtRQ==; Received: from 80-109-164-210.cable.dynamic.surfer.at ([80.109.164.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dpGzz-0002Li-RI; Tue, 05 Sep 2017 16:46:52 +0000 From: Christoph Hellwig To: tj@kernel.org Cc: dan.j.williams@intel.com, john.robert.loy@gmail.com, linux-ide@vger.kernel.org, stable@vger.kernel.org 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> X-Mailer: git-send-email 2.11.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@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 Acked-by: Dan Williams --- 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)