Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdIVHnB (ORCPT ); Fri, 22 Sep 2017 03:43:01 -0400 Received: from mail-dm3nam03on0072.outbound.protection.outlook.com ([104.47.41.72]:19201 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751795AbdIVHmz (ORCPT ); Fri, 22 Sep 2017 03:42:55 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Zhiqiang Hou To: , , , , , , CC: Hou Zhiqiang Subject: [PATCH 1/2] PCI: Disable MSI for Freescale PCIe RC mode Date: Fri, 22 Sep 2017 15:25:21 +0800 Message-ID: <20170922072522.36306-2-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922072522.36306-1-Zhiqiang.Hou@nxp.com> References: <20170922072522.36306-1-Zhiqiang.Hou@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131505397732009251;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7966004)(336005)(39380400002)(39860400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(110136005)(50986999)(498600001)(76176999)(2906002)(316002)(50466002)(50226002)(48376002)(16586007)(72206003)(305945005)(2950100002)(36756003)(189998001)(5003940100001)(8656003)(68736007)(81156014)(104016004)(356003)(81166006)(8936002)(8676002)(105606002)(77096006)(97736004)(4326008)(5660300001)(1076002)(106466001)(6666003)(85426001)(575784001)(6636002)(47776003)(53936002)(2201001)(86362001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB2356;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC007;1:uOECwMNOBB4tq5BUHQsMTbsgRha/JIdq7uPwla1aOAuA0n5EC/vJ0WWHbCqFah+JqwLOT5MSFcmPvkf9556nN1k4DI59Q3Ws7NjzZY57g2pO/OVx+EgQdv7+H+MEaawW MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc3888e6-52b3-4d20-83c4-08d5018d8851 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2356;3:NhwdHWGDPf2QoDQiGnFown6mW0IggeX4gSic4CyT6GgvN8bpFbYjST50BZZKUVbinAaioCI5FAgh+Fvp5qmDM6l7Qkln4kvn07kcwfXqjI6VDY0xI5nYpZdO3z3fpUook3hR37NWnGId8aTua5GaFEN1jwKiFR9MPjGW9MWGviEcwmngpJp1Vte3vyR0QuTkP3uPMOETgdF7svxfuQ+V6I12ezcgFJ2JG7GRGsgyei1pw3Cgt/SwY6egutAVhlzW88z6NJIZ6OjHYu0bCAaKFAl5/FDJBmLNW/TAtjs8EbktAJkQin6aHj7egcHaXPy5Jk4u3CeSKA5H49vYaiVbUeI1AOqSRCBW4Repk1LcsoA=;25:GpuU0yC0GEusrn40nD388R174yxn5K6VhTaj/RdjR9KY0LTH3VdNSt4TEY85b+DPiblhphssM2xtXDQVl0Uh6IlUlF38BZcOg0zat0rGlMuqI3VP0ioCKM82YXFMo+QOPp1Ouhb9eLU2b+OyNLfv5dTtqtgsWUnP9dIgCZ/GZYByEp4BMvAX9SCBZqNkWDY6JlE09iLvfv7JlhRyhpUEKirDr4tHjPM7Cl2b8dSPTKlYp4u2riDkxAhmh5qXu506WXGSh5VgOXAIDWil+MJoOrwhg3qHDYElFDMrmD/4PX2Lq0STNwowK3s7qLvCTEeUkF6/QQ/+LxtczwEWK0vc0g== X-MS-TrafficTypeDiagnostic: BN3PR03MB2356: X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2356;31:2DOjDdC7PUz/3Wj9gqymatNGMfpidSk1ak8WnHlu8VBm43Y5vz9+uCKKLsvg6tS6dz7R3Kv4fO+Cgt10wtzdLCyMtPFf2EDXILFNuQ/FeoUbofG+qmaJ+UtpJvLZmSA0+xhKCx8XWjW3FwUB7E6IxaJ9E57aKSfl44CBxYZ9jhLQczYsZDrdMsLNaUJH7tNUEZDTAYnEi2i9wnfmu+rdBmUrNqyDa07Key3wGqx/APw=;4:ptGYhqRNV9IYOYDZ7bDSHo835FOpZcZ2EHUA8tyN/5Nr8CKu6aWzlvf2YKxs8cWV2WeWt+CIdDubFstKpkzFppfxUJgyJB7jO+jaOSMd/57ubnkyIdkibJi3lUD9EaE1VbF3BcUjQ+TyGoOcqwJbSiWhZxrhDdMPhtwrBNCtjcFXinQOrmLaE+6/GWSbxLuJwVaOnhAYNRt7E15eGtEz59OPNSOOaNPiUv+2T4N+g2W0M/2+ye0Bj9O7D4RiH+1qw9HEhU8oPutiDZQh7AouhZ1fAeo7JRHaE3y1GFrnfFo= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123563025)(20161123565025)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123561025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR03MB2356;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0438F90F17 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR03MB2356;23:qJqxJTqn3Fdv5Mg3JOP0oLN+EzneKNUziWN/BlmNT?= =?us-ascii?Q?V1qN90us8azJuSpq15a1wJc9atIBK9hyyv/FMxLKZYnOsLJNN61kqmreWYhH?= =?us-ascii?Q?UB5qLZom50v9SLqg+GRbHUhKyasAw15n2gpgoFFNA+hCd4DT3IziwkDETaU2?= =?us-ascii?Q?uBbpCmfXE810EnuIfAkj/2CSfVX+zqL5AAjQHu3HNIKshQF0tLDt94cys9Ls?= =?us-ascii?Q?vWb25rfM3VbvkW+AjnWlHBQwpgf8e12ACEi4BmzqfHy+70NN9bqV0xOapA0F?= =?us-ascii?Q?qk7Vo0qbKV7eHrfvwCRZR2PSmtNhsQ5FQsAQgrninztauaHoNP/ZR6B0oMKT?= =?us-ascii?Q?o/bcLjPVdaTfRkTVvAqi27kZZd63o+2yHZwfLLBOKSzcni62Lrrt9nvJMZbV?= =?us-ascii?Q?uXHT1H9PjA7tv9OFQG8IVVdfZvL0gui0I1TlqoD6DrCUOp45XD+5XrTNJV8y?= =?us-ascii?Q?g3Bv/h+TFHZ5hliPtg7rmL06aYjQzIFor2XehJ3s2K3CoA6wIYqK7fAaE5BB?= =?us-ascii?Q?ZcCOzKgQe09BH1Ib0usCvBBqYV6ClsT9Eb+SqaoIUE5Rcl1EC7xR3s4cehC3?= =?us-ascii?Q?kXbg9p/rwJ2PlKyU5jUm0wsfIhsnh7p+yVEQfmSEUlPvgFyMpKM8EnOdcWB5?= =?us-ascii?Q?fY/JQd/CS270f2c2AAdoifKuam8dbzGFCCiB6amhQMoHHqB0GQC+bZEKtHQL?= =?us-ascii?Q?Mt0Hamp7FW/VGSmYLYI/KNMpkY971UyRY6B+kf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kChYeN8OUDsHF3rZh5o4JqGq2g4QS38q6sLGIWVYdwB1mosHCPjuN/uTXCV8GFxh61Dr0BfHRmMGlqS+kM5/wFQ/KGpOnRVie0Z9grXA==;24:gGvZLYtjf5V1MauzCs5oNxFNlIQ5R3rdw6yO8fbXlWQIlGqrg3xGBSdgQGyACot49QaoqLuHgWuZgDXmS49pjqoGvQJjFE7y4rSkJPQTP5s=;7:fDCfM02v/5nDEVvIkGBxeUDp9iLMhNyCmpmXVC94BLDJzx3hXrShpG/WFY+OdWAZvlnbeqyJveR5xI1rukkD6/5JPC1sxcIxqp1OJ3BI8xRohldXoEzEjdVup43FyiZkTfvb9BcGlHrXQPvpBSRsYuW4sbBuDrGm75uZSxCsN+KbTIlP4eVyW9r7X2EplsVU5fyQhy2G6jrTNBIJX2SVACPcH/xlVcL0sWmVX+wFD3s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2017 07:42:52.9981 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2356 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 30 From: Hou Zhiqiang The Freescale PCIe controller advertises the MSI/MSI-X capability in both RC and Endpoint mode, but in RC mode it doesn't support MSI/MSI-X by it self, it can only transfer MSI/MSI-X from downstream devices. So add this quirk to prevent use of MSI/MSI-X in RC mode. Signed-off-by: Hou Zhiqiang --- drivers/pci/quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index a4d33619a7bb..c1063a420f0c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4799,3 +4799,11 @@ static void quirk_no_ats(struct pci_dev *pdev) /* AMD Stoney platform GPU */ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats); #endif /* CONFIG_PCI_ATS */ + +/* Freescale PCIe doesn't support MSI in RC mode */ +static void quirk_fsl_no_msi(struct pci_dev *pdev) +{ + if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT) + pdev->no_msi = 1; +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, quirk_fsl_no_msi); -- 2.14.1