From patchwork Fri Sep 22 07:25:21 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: 9965363 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 76CFD602D8 for ; Fri, 22 Sep 2017 07:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67674297B3 for ; Fri, 22 Sep 2017 07:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A5DE297D7; Fri, 22 Sep 2017 07:55:53 +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 0BA59297B3 for ; Fri, 22 Sep 2017 07:55:51 +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=D3+fqrOgKkzee5q+j6ssL+pd7IC8L3If6qw7/5mYmgw=; b=dDMn7VCC2sr4hR uKAipoV4UiX6w9wCfhrea7mB+qpevfogK0Q02cQonPY4JjijUkrfIiibFDCx0UUIdDI0WsXmC7j+f wZxGWMjEGk5YT9QI1QF5XITze911kir9s7KaeVzqmuP+AUeJ+l/TKieFk69Cf+9f2rNj43m+z3RK+ W2LcgEuVdUdq3ysk+uMjTUPh0BS8CSKeXrx+PkLz5JeT4rGTjM0YwbMMmpowvgW2TXyLsZPU1VSKJ Mtcp97n/+gHk+YkRXVrn65X+o5lgz9SzkPPCPj3JvYDaBqV3m4ji/aPnX2fvIApGp9q9lxFeqaig2 TM8ik7w2W3x/iP8Pntrw==; 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 1dvIoQ-0002bz-IG; Fri, 22 Sep 2017 07:55:50 +0000 Received: from mail-dm3nam03on0075.outbound.protection.outlook.com ([104.47.41.75] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dvIcF-00033I-CY for linux-arm-kernel@lists.infradead.org; Fri, 22 Sep 2017 07:43:24 +0000 Received: from DM5PR03CA0040.namprd03.prod.outlook.com (10.174.189.157) by BN3PR03MB2356.namprd03.prod.outlook.com (10.166.74.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 22 Sep 2017 07:42:53 +0000 Received: from BY2FFO11OLC007.protection.gbl (2a01:111:f400:7c0c::122) by DM5PR03CA0040.outlook.office365.com (2603:10b6:4:3b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Fri, 22 Sep 2017 07:42:53 +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 BY2FFO11OLC007.mail.protection.outlook.com (10.1.14.254) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Fri, 22 Sep 2017 07:42:52 +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 v8M7gidS030488; Fri, 22 Sep 2017 00:42:49 -0700 From: Zhiqiang Hou To: , , , , , , 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 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+k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fXxkChYeN8OUDsHF3rZh5o4JqGq2g4QS38q6sLGIWVYdwB1mosHCPjuN/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170922_004316_417429_9A5719FF X-CRM114-Status: GOOD ( 12.32 ) 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 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 Acked-by: Minghuan Lian --- 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);