From patchwork Fri Feb 3 20:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 9555095 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58C1360405 for ; Fri, 3 Feb 2017 20:42:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ECCC28135 for ; Fri, 3 Feb 2017 20:42:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43AD028425; Fri, 3 Feb 2017 20:42:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9D2E28135 for ; Fri, 3 Feb 2017 20:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420AbdBCUmL (ORCPT ); Fri, 3 Feb 2017 15:42:11 -0500 Received: from mail.kernel.org ([198.145.29.136]:60980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbdBCUmG (ORCPT ); Fri, 3 Feb 2017 15:42:06 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9067020379; Fri, 3 Feb 2017 20:42:04 +0000 (UTC) Received: from localhost (unknown [69.55.156.165]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F0EF202AE; Fri, 3 Feb 2017 20:42:03 +0000 (UTC) Date: Fri, 3 Feb 2017 14:42:02 -0600 From: Bjorn Helgaas To: Dongdong Liu Cc: linux-pci@vger.kernel.org, wangzhou1@hisilicon.com, gabriele.paoloni@huawei.com, charles.chenxin@huawei.com, linuxarm@huawei.com Subject: Re: [PATCH 2/3] PCI: Set pdev->no_msi=1 for HiSilicon Hip06/Hip07 host controllers Message-ID: <20170203204202.GG10291@bhelgaas-glaptop.roam.corp.google.com> References: <1484202504-96686-1-git-send-email-liudongdong3@huawei.com> <1484202504-96686-3-git-send-email-liudongdong3@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1484202504-96686-3-git-send-email-liudongdong3@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jan 12, 2017 at 02:28:23PM +0800, Dongdong Liu wrote: > The PCIe root port in Hip06/Hip07 SoCs does not support MSI/MSI-X, > it can only transfer MSI/MSI-X from EP, so we add the quirk to > set root port pdev->no_msi = 1. > > Signed-off-by: Dongdong Liu > Reviewed-by: Gabriele Paoloni > Reviewed-by: Zhou Wang Applied as follows to pci/host-hisi for v4.11. I removed the device ID, since we don't add those to pci_ids.h unless they're used in more than one place. I also reworded the changelog; let me know if I didn't understand it correctly. commit c2f8051a8a0c7ea9e93d80e484948cab583b7605 Author: Dongdong Liu Date: Thu Jan 12 14:28:23 2017 +0800 PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports The PCIe Root Port in Hip06/Hip07 SoCs can transfer MSI/MSI-X from downstream devices, but does not support MSI/MSI-X itself. Add a quirk to prevent use of MSI/MSI-X by the Root Port. [bhelgaas: changelog, sort vendor ID #define, drop device ID #define] Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Gabriele Paoloni Reviewed-by: Zhou Wang > --- > drivers/pci/quirks.c | 1 + > include/linux/pci_ids.h | 3 +++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 1800bef..20cbdae 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -1634,6 +1634,7 @@ 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, PCI_DEVICE_ID_HISILICON_1610, quirk_pcie_mch); > > > /* > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 73dda0e..9cc4720 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -3054,4 +3054,7 @@ > > #define PCI_VENDOR_ID_OCZ 0x1b85 > > +#define PCI_VENDOR_ID_HUAWEI 0x19e5 > +#define PCI_DEVICE_ID_HISILICON_1610 0x1610 > + > #endif /* _LINUX_PCI_IDS_H */ > -- > 1.9.1 > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1800befa8b8b..c49ac99bda4b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1634,6 +1634,7 @@ 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); /* diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 73dda0edcb97..a4f77feecbb0 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2516,6 +2516,8 @@ #define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700 #define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff +#define PCI_VENDOR_ID_HUAWEI 0x19e5 + #define PCI_VENDOR_ID_NETRONOME 0x19ee #define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200 #define PCI_DEVICE_ID_NETRONOME_NFP3240 0x3240