From patchwork Thu Oct 12 09:44:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 10001451 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 25D7660325 for ; Thu, 12 Oct 2017 10:03:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16F5E28D4F for ; Thu, 12 Oct 2017 10:03:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BBDA28D5A; Thu, 12 Oct 2017 10:03:26 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1413828D58 for ; Thu, 12 Oct 2017 10:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8fQcZN2mRqW2Z7G/RcmTFH7RTARBg7EwmtaudnRxVio=; b=bdxL8G8SDFsnmr kuHERTmPAR3ef7lHp4hF8FsWtPTreDnyTY8P+PeAQE2fyZBtkEIaQp02KEqvpeFRYZP/0MsWgw5Nl xkiekQexM1ltfbu00hvbICeUxr4DUH833qSbJ3NuUkX9eDDiXIrWUzyKWjX/YCzUaj8HJH2vs/aKj rb7DBNu4rBjKbTZXhKp/cGwtTcvbkn/GIA4wtU49kYLdp+hbiMbU1xQ0Yed+1GioY07IKQmGf6I1i V5270LgnLMql05OL2631rH4U/5D4b/Rx70qGnZ6ovAPs5tiaQ15WFXFBiLbl04zxkelJAuqFYtzlP GudlXfqYL60I99rJn8ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2aKo-0006PA-WB; Thu, 12 Oct 2017 10:03:23 +0000 Received: from mail-dm3nam03on0048.outbound.protection.outlook.com ([104.47.41.48] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2aKT-0005xq-5D for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2017 10:03:05 +0000 Received: from CY4PR03CA0080.namprd03.prod.outlook.com (10.171.242.149) by DM5PR03MB2699.namprd03.prod.outlook.com (10.168.197.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 12 Oct 2017 10:02:39 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::172) by CY4PR03CA0080.outlook.office365.com (2603:10b6:910:4d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Thu, 12 Oct 2017 10:02:39 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 10:02:38 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9CA2VVK001998; Thu, 12 Oct 2017 03:02:35 -0700 From: Zhiqiang Hou To: , , , , , , Subject: [PATCHv2 1/2] PCI: Disable MSI for Freescale PCIe RC mode Date: Thu, 12 Oct 2017 17:44:47 +0800 Message-ID: <20171012094448.31217-2-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171012094448.31217-1-Zhiqiang.Hou@nxp.com> References: <20171012094448.31217-1-Zhiqiang.Hou@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131522761586398300; (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)(376002)(346002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(6666003)(50986999)(189998001)(106466001)(76176999)(36756003)(316002)(68736007)(16586007)(50466002)(498600001)(110136005)(305945005)(48376002)(105606002)(104016004)(356003)(2950100002)(72206003)(5003940100001)(53936002)(47776003)(1076002)(6636002)(85426001)(2906002)(5660300001)(97736004)(77096006)(86362001)(50226002)(8936002)(8656003)(2201001)(81156014)(4326008)(575784001)(81166006)(8676002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2699; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD042; 1:fy8HmfJcFU17OSydQqV5xjvuzq6qCAczx3APWGjlYc6zIDRkIsl5DGXfIBEVZjS7JNPC5v367HWYmbhXcZoTM2FTwzBXtN5D3OPQYudrAtFoAL/r+lzr7WmwTKAc8DHI MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de4e7445-ae2f-4076-545c-08d511585eb3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:DM5PR03MB2699; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 3:/2P56ADBgSa/Bto9mUxBg8onc0pLrn+LxcxGA3JapXlA/XATWRQ023fBnjZxuxeaQy81zz9IfZ4WTBiQKDDb5Q7OaXrIcYntiulY9DNd751/KSPyPP+2Gn9CmTRDVZgGSPV9+MnrUi/OKr3AVLlymO5yxGAJoSHoq/m2g+M6+nxiIXdjN0JfZTq7T5PghjRrgtvBLrLwIXm4Efxkaw/0xvfFG/RbAROhsYVAf4XT5LyeCxQLssfTv3wPXFi8BX+cJ0Wt2Rshfa4vJ7VvJJODAPhB3uowMazwp830gYb+vixillSaYYbMGPN3Sx99bslSP9qOZpvh3waKv/V12AR8MZxSA3Rk0NYSzsc0LSch4MA=; 25:ymCJ9Itp7rer8pbcvms01iieHqbwwNiaUaK/5LdkbO/9QyQy67ZOh6mVLRzrygQJ/BeUAc1azU9LGxleSbmFl8i2WONawzvsryfvBql2PMs9AJZ+SjdJnSZeuP7ccksHE4BgH3c8oJMnBmRw9XPxzFi2PatlClLJ8dvF4OAQi7DPj1vNMvRil2aGiQH6/rOQLs0MwtEobAKB1+I4ZhxaEQROMfg9rNwYwnhoQ+zeVBNIqUf3xNNcuGoZkx0nWwWptTi6YBG7BjFRvuSDjHNzPdSgDquDw0drz7/tc2OXNSxirA57FcjyHOxsH9Tssim3Ul6Tlg2njiUQgl3Gdx0fAg== X-MS-TrafficTypeDiagnostic: DM5PR03MB2699: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 31:hhmAJkE/y/ILM9Gb58H2CIOs7n6ssIYd+9Q4oBOqGDJMPTxLKRt7tTBihLgzozGG+L7/TWp6Np/WtT9mS1irEW5RW8OKr/ri4yxEYurh/1AYojQLU5GOXxTLIBXERZkq+hwGYWfgp71dXhPTFZheg6VmlXWP8ZQjuYrpshHh+O+ndiaJONGBj4ELT4Cf9DQvJgU4w+HQgNVmq37m07obyPrKPwD8c39K7HHvztIIiVo=; 4:xjfMdALVFe0OTYONu4bST6Gpdf3NilKQO/KBslLkEZpA5GNUq1BaESTcJcbQwDiFLDXvxRoi9L7jvnOXFGBZ2AFY6/6KwbXG7/cmLZ4TJcj2CUtX5Fkjgow2cdSYQ5tCe8Y6FzX7pi2dA6k/c7sGbA4tKqbF4Nxxopb9VW/ajyRkIuZcoc5vRMFWa4I078CrN0yJSFPWQPAmt4R2hJrIqNM2XXDa7yRmDBaaFeSSyuItvRcSaSmg+SVhIQWfDVEhx8zPDgcgsefufHq2pxG2VtFL8bHsoNnw/4TlFkFjo3M= 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)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2699; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2699; X-Forefront-PRVS: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2699; 23:44TgVJOGBAuUesCqGVgCgwtGFFM6Ly8tp2vjgzwMg?= =?us-ascii?Q?mGzcdGIyvk7ITgJTqhhRZrdT8aKsCDA724fVWq2Mhqn1p3FxxsbTYd6gvCx4?= =?us-ascii?Q?1Fro25kMw+DO000TLBUUbq3SFakEi9v9Qw+7f6OqTqVkOMpQJFlIo7j2/HzV?= =?us-ascii?Q?GRre6Libl4duniEtjiD3Ici4s/ev5HzGfPgC52E0NbbGYA3m9TVA/f8Dmfb7?= =?us-ascii?Q?CT47ZjrTV3okAw3YwziHrMXBINXj5R2BrvJf33tsytVeu5d407q42yjTfmfg?= =?us-ascii?Q?k3PqCWjyS3xRqELLVzcy0Y2x20LM6GOcxVHjiRLp4TlkcSF7RoYv2EDMtoQA?= =?us-ascii?Q?CVjRimeweWRH8ypDeJ+Wqc7F3J8cTb/nyc/kr3jBe5XeebF9KYpZsTJ70AdW?= =?us-ascii?Q?+k94XHelceDU1DonPv9323rL9CaUEJ/LlvTLjoqSlH5qVKUTsb/ydCU65N5s?= =?us-ascii?Q?ztk2aLxvgEJ0VFiadlcPuQNkQFlWfrtJb7q/tAvosu1o4hwgsIlpOw3p+F/m?= =?us-ascii?Q?9TCvG4aOsZu7G1Utqm6xdN+Nb/mMMTw84VaEya4PK2uu7iAqj3310q6QuHAo?= =?us-ascii?Q?20CGpvrqCz0bpkotoaA9mKEAqa114PKiBT7AuUanVKKuWFOmdPx45FRNev9k?= =?us-ascii?Q?P0fplQtCFHvdSPKHCENWsehRvpiqmtcQ8nYzIrnhS4dQwQAXzPJL0lI4rnFX?= =?us-ascii?Q?o8aCMwxIYNRFYK+B/si497oSJbEbWYTcqSuGN4BdA23p4MTuwP9EVJWBKaef?= =?us-ascii?Q?wkyOjfmoBUVBWRMB7lzuguuS9Ww1ZGXsjFlBAtteyu+MNqthNKbk8+M8jxBv?= =?us-ascii?Q?u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w==; 24:4k+XitRVEZe3PmIojjy5gcx2VlGjpcqrbxElTw+YbwO+IFff/SzvWavb0+zymGEwN8OgZYy2SzbaHY2MFf2vPHjdk05Bhlg8jQQAEs5qC0w=; 7:3dr2pkUvWWsUtmoM+AEpvM6DAZEg7+jSAEjYKd7mMUur5riWBROqj4wJ+mLhiu6WBnXaEhZwbVcFNxH/MANv1AK2LS2btJuVm6PBNQBxSEcTVARloUw8XxdpjHQGIUKIuPQCRmxRbQwUPZgMMjcchwe5+lwZwP+/93OBCk2cU2nI515WJ99otBmTHzjPSFFpessgI8nox4ZxAUx9l2H5olXkCyiS5dsquCtvnHe/8mo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 10:02:38.4526 (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: DM5PR03MB2699 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171012_030301_569492_E4044237 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hou Zhiqiang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 itself, 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 Acked-by: Minghuan Lian --- V2: - Fixed a typo in the commit message. 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);