Received: by 10.223.185.116 with SMTP id b49csp1016667wrg; Wed, 21 Feb 2018 10:37:19 -0800 (PST) X-Google-Smtp-Source: AH8x226WkAKKB1FI5fUSqJ5sBF2vJpqT2tbUX1zVpSaATcw11lOu1ENI4M8H8bc4CDf7QMAkmfF7 X-Received: by 10.98.94.71 with SMTP id s68mr4176893pfb.135.1519238239624; Wed, 21 Feb 2018 10:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238239; cv=none; d=google.com; s=arc-20160816; b=gDmNZcOYcUoPnP2t3jHwovzJlRWrGs+ZdnQm+Udn3Wm3wdtr+msuWMfkwVHCyEkghr vT+vnR3FWR9gMr2wyGdMkE1ldlsE7AKZqlbHvo78RbuCxK2FNNYENvsNReqsOLjOFgjE dyx4y9L3k4GYyfoII1hIL9eufydIpnZnD7WhB5aOYyI7OJ41+vlx30OccWaXrCnX9Buw q1Z35kqLRB4j6TG9GKuyFcoiYNqrhTeSJsiRWO15IPNdJbNd4MMOysecerljQbhvVl2k 8KqpvBgJ+Z/lzD8/dg5nPPLUTrg6FNEH9Zznrek+zjCoofxhq3rESSoYpPxvZaqXLvp9 NpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZzfLXp5GeQRMgQN9wH7IC/FiwiXpMzZvsoSSJU1UwnI=; b=IqIBq7X/zZX8uEWBV+FPV3eeQ9FuaTcRChBC2WQI3232+l81RcisTKlhHUV1IjDjIH XTuC4Vr699FFJzlK0hdLNHW2UC4XsmVyKSadYU3UdH7sCueJDJ03MGIlaIQeKCh/XfB+ JvIwMIjx0MgnN7v6WvXVLg+PuP/VJn+v3sZ8HkpJBqzSzZPw6ENawYYC2a+4GgrzUpYR ZfHHFHJWBz6qMJ/DFAq+xVkFIOT4yYGCuLlVuJHv6B3A6+/QRBW4B1FtYa7J3Hl58gu2 Rxmyae1GEqluTo9NSqt2pZPiIIc8xGH//r8SG9j92kXQJaCykpBYz1bMaVbq4YHH6+oR Wlgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si6601866pgn.571.2018.02.21.10.37.05; Wed, 21 Feb 2018 10:37:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965562AbeBUNLV (ORCPT + 99 others); Wed, 21 Feb 2018 08:11:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44514 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936295AbeBUNLL (ORCPT ); Wed, 21 Feb 2018 08:11:11 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A1898124C; Wed, 21 Feb 2018 13:10:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dongdong Liu , Bjorn Helgaas , Zhou Wang Subject: [PATCH 4.15 115/163] PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode Date: Wed, 21 Feb 2018 13:49:04 +0100 Message-Id: <20180221124536.501956276@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dongdong Liu commit deb86999323661c019ef2740eb9d479d1e526b5c upstream. HiSilicon Hip06/Hip07 can operate as either a Root Port or an Endpoint. It always advertises an MSI capability, but it can only generate MSIs when in Endpoint mode. The device has the same Vendor and Device IDs in both modes, so check the Class Code and disable MSI only when operating as a Root Port. [bhelgaas: changelog] Fixes: 72f2ff0deb87 ("PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports") Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Zhou Wang Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1636,8 +1636,8 @@ static void quirk_pcie_mch(struct pci_de DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_pcie_mch); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_HUAWEI, 0x1610, quirk_pcie_mch); +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_HUAWEI, 0x1610, PCI_CLASS_BRIDGE_PCI, 8, quirk_pcie_mch); /* * It's possible for the MSI to get corrupted if shpc and acpi