Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1972821ima; Thu, 25 Oct 2018 07:46:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5ddzFou52YxPBgubGMK5XHaYjVrAvTql49UdMLV9m/wcdVYBUE7yDTeJSpYu88X44fGVBkF X-Received: by 2002:a62:5fc5:: with SMTP id t188-v6mr1865974pfb.84.1540478816075; Thu, 25 Oct 2018 07:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540478816; cv=none; d=google.com; s=arc-20160816; b=etWMvQOah7mZcAhxcCuMGGS3c3CAwj1AbH7+ba8j08UoexTbaSSdfqnD/+6NgX6OoQ uG5m9nSYCXm/RzZQkrmevyNHdu3PXLUFmvJYMbZhm+8fOYvlia1rsLc/OYDrXLpvK7Qg Y2zJLfhebVCW+oRhyJI864r+Z/wrvv+awnPmQDeyyciVrWpQXkpLQMR3/PHgsZrq0Iyn S3B5Xk9hpmay64m22Be9levvouikWQ+aJbuZ7+N1Ws4T36ENWU7TUE6iYb3ddPxqS5pF fHVTJ00tHK2BG1KIs2kAk93503pcy4WsRDTbF76cfTseuL+2zyRpRepJFYJwERT2IkiC 1Egg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=8Lbr97JagkyyjSeap4EDS00f1MqFqJ3SrTmdY2xg+iM=; b=bR12TDAq9cMuNAsOIBnVjs62dNldN1y+1AtvbOlIZgHSwus5rs+Ic8nzfTwhHbF2Zh NGaWmZOVrlY5RDTvWlem3JSiide1c5NFSOkx9wJaBL031Nc3nM6l+hvhAaPF7HnRnZO2 0aNjMp6mL46Cs0CNwhWCd7WezCiwmV8UXjBznkSef6hgUfpeT+rH7VDqHUQtS6xkgQjn 35r4j2BKgYOnl3eVShdLbUlqPtZcEsai+rAfpXxGhkceSQXOt8Qx3V0MZB8jZGXC42mJ B6tpd5dBgQb7Kmal3ZN7lhRBrOVg0G0OsZw0w1gXOZOtbusY7/WkjgYH4ZaTa26ALEwr i9ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="1i/rdYJ5"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185-v6si8337989pfl.104.2018.10.25.07.46.39; Thu, 25 Oct 2018 07:46:56 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="1i/rdYJ5"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728601AbeJYWri (ORCPT + 99 others); Thu, 25 Oct 2018 18:47:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbeJYWrh (ORCPT ); Thu, 25 Oct 2018 18:47:37 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15BE22085B; Thu, 25 Oct 2018 14:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476881; bh=kD/hfytCsonVGxGi4Fi26bd6ZsMy+oKQ/bllW0mDqKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1i/rdYJ5WBJy5Q+HyqfwWtbYOhD52be2gCeqquOJ2eTpXhwUlE0lCLhB26xpATP+L G0W1AFXWK91p7WV0kxsOZWdpDRUeLZWqJfjXFjCVb7ZhVSKJBYOVUF9IrNZHmNTR9V lLdBMu1a7u6JjLBD1JJqC9OS6wxXiSjnSYJStbhg= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Dongdong Liu , Bjorn Helgaas , Sasha Levin Subject: [PATCH AUTOSEL 4.9 09/98] PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode Date: Thu, 25 Oct 2018 10:12:54 -0400 Message-Id: <20181025141423.213774-9-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141423.213774-1-sashal@kernel.org> References: <20181025141423.213774-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dongdong Liu [ Upstream commit deb86999323661c019ef2740eb9d479d1e526b5c ] 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: Sasha Levin --- drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c7a695c2303a..2250f0d33481 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1634,8 +1634,8 @@ static void quirk_pcie_mch(struct pci_dev *pdev) 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 -- 2.17.1