Message ID | 1537283976-19703-1-git-send-email-adouglas@cadence.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D977D15A6 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 18 Sep 2018 15:19:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7F642B261 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 18 Sep 2018 15:19:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBECF2B266; Tue, 18 Sep 2018 15:19:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 9334B2B261 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 18 Sep 2018 15:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727756AbeIRUw5 (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Tue, 18 Sep 2018 16:52:57 -0400 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193]:41906 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727348AbeIRUw4 (ORCPT <rfc822;linux-pci@vger.kernel.org>); Tue, 18 Sep 2018 16:52:56 -0400 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8IFJ3KD011150; Tue, 18 Sep 2018 08:19:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=proofpoint; bh=RODBcRzswngvqg98dUkhex/I/RL/gWvNaWehFvMZFE8=; b=kxr+XjAU9k3oqut4IyNcmPYJV10TFUvob6Xq/0gSkZWbCnNOaIGopJzeGnnDk5xEpvxT PaxnTeYxWpBOblg5xW6WE8TT8H7iSwmGOrgJHgfmr3h9b1QCvV+L+7kYY2xfLVSjmc0O Ba5hd2hf4slAZ5C8uYy5ymAOooPQHG2/3tVPISjyg22HtgV7m7ODPMr3TZ6zQ2zHtMRc wQSo71sQFah0UnuQCU7beoCNfWug5ya3EQqwy0wGAuhvLqd0dHDeeobQrWJeumCpiRZ/ Mnr/UMFs5sU2Ol9uUF8cNv67zq4VEt7Z642Rgx+in4704Qe+kgEurdYzRePAhy4VT08G pg== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=adouglas@cadence.com Received: from nam01-bn3-obe.outbound.protection.outlook.com (mail-bn3nam01lp0176.outbound.protection.outlook.com [216.32.180.176]) by mx0b-0014ca01.pphosted.com with ESMTP id 2mgwnv7q6b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 18 Sep 2018 08:19:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RODBcRzswngvqg98dUkhex/I/RL/gWvNaWehFvMZFE8=; b=MwaTJoYV6Uww4u62p+TrjsODFPhXkzGZ/ue3CuTggDaCisgLFu5tL9WRFkSeMwApFYrY56iNfwkIj70i7sMifd6cGO7XAC0byOcW25WejBSWl7pY8Nd+P35zgORMIpsbnSyhW1agP4MPApLKugnFUo61r7viPqB5H3PgccZjB3g= Received: from CO2PR07CA0074.namprd07.prod.outlook.com (2603:10b6:100::42) by SN6PR07MB4414.namprd07.prod.outlook.com (2603:10b6:805:59::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Tue, 18 Sep 2018 15:19:42 +0000 Received: from CO1NAM05FT055.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::208) by CO2PR07CA0074.outlook.office365.com (2603:10b6:100::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1143.15 via Frontend Transport; Tue, 18 Sep 2018 15:19:41 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx1.cadence.com (158.140.1.28) by CO1NAM05FT055.mail.protection.outlook.com (10.152.96.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1185.5 via Frontend Transport; Tue, 18 Sep 2018 15:19:41 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id w8IFJd8V022248 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 18 Sep 2018 08:19:40 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 18 Sep 2018 17:19:47 +0200 Received: from lvloginb.cadence.com (10.165.177.11) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 18 Sep 2018 17:19:46 +0200 Received: from lvloginb.cadence.com (localhost [127.0.0.1]) by lvloginb.cadence.com (8.14.4/8.14.4) with ESMTP id w8IFJccw019795; Tue, 18 Sep 2018 16:19:38 +0100 Received: (from adouglas@localhost) by lvloginb.cadence.com (8.14.4/8.14.4/Submit) id w8IFJcVQ019788; Tue, 18 Sep 2018 16:19:38 +0100 From: Alan Douglas <adouglas@cadence.com> To: <lorenzo.pieralisi@arm.com> CC: <kishon@ti.com>, <bhelgaas@google.com>, <linux-pci@vger.kernel.org>, <gustavo.pimentel@synopsys.com>, <cyrille.pitchen@bootlin.com>, Alan Douglas <adouglas@cadence.com> Subject: [PATCH v3 4/5] PCI: cadence: Check link is up before sending IRQ from EP Date: Tue, 18 Sep 2018 16:19:36 +0100 Message-ID: <1537283976-19703-1-git-send-email-adouglas@cadence.com> X-Mailer: git-send-email 1.9.0 MIME-Version: 1.0 Content-Type: text/plain X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28;IPV:CAL;SCL:-1;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(376002)(39860400002)(396003)(136003)(2980300002)(36092001)(189003)(199004)(5660300001)(36756003)(186003)(26005)(51416003)(8676002)(246002)(4326008)(50466002)(48376002)(2351001)(305945005)(8936002)(86362001)(426003)(478600001)(87636003)(26826003)(106466001)(47776003)(105596002)(316002)(476003)(50226002)(126002)(2616005)(107886003)(2906002)(16586007)(54906003)(6916009)(7636002)(42186006)(486006)(336012)(356003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4414;H:sjmaillnx1.cadence.com;FPR:;SPF:SoftFail;LANG:en;PTR:corp.cadence.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT055;1:8hEbGyQrRZqa5x7pdqQA9HQTGiyo6e6YIhGj1w1zfkw5x4FXPTUFQCSz5be2IMBC7SgWcVaYcUTFaF5+BEwUev90PYd+WV3MJrcOLv5mgOEd+w0zfvsKR7DgTZFPDI7h X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef404e1f-86ec-4ce0-3580-08d61d7a2848 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060);SRVR:SN6PR07MB4414; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4414;3:aZsXIch0XtM6Q7Uc7iv0OQJs1/l8aX3RZAFQkTkb3nKqeJSzTTdKak+dp2viMsHalF98Npwso7OgWSzRlqzw79QDWI2zipJzWW+hQbJl1YoIVN3HBdBXZJBAicxOGCn/qd1ZRfiAkdSQaxKSkJxPuWcsC429eUvZzV91uocjgr5KMI1DhJ7z4U+tnN6Z1HwZr4DFKMYhu27oglF81O/7jRux1Sk0qeG1ZkmNoKtqPZsLysVhCqktFwo8iOU7JjSk13svnazLFxZTuOjRr1Em+IxHRbPXxJ5X/+3venfMqsp9ZaN0rKqOvtxcxk3jmMw6g3PEII/Rc+H144DhhqNkfnTSHetvVTB9YQz99maxCYI=;25:SEmDy69/bwrLcSvdA0zK3SrxaBk0EJvRszVe1alklCubHXOnv6GjSD+kjUvzNADHn6rK8CYDkh4FgepbjhzWDmsNHuLtzeiya2ycBy0yoEA6BTneiv8FWVEr0NdVSMQAKsZNSXtE+FbEBlLhihd3Z0KxKXoL7W9CevE2cVPd8XQuX3p3KZAQ2RNxrsTbOFybneF8Yy73FPLJoJLMy6Ge2r07msjjIW2uXoOxDWVphVDlvmUNFpoMhP3sni41nXbZlwP0+xRTIIPBty4sgnV+aNyJQLmYhlrPIpltm/CIGhVsERsIlt9qwvuwN705f0a+uVGDubsT8MwdKNEQ51uCqA== X-MS-TrafficTypeDiagnostic: SN6PR07MB4414: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4414;31:7ibncaHeXU9Hkj5MYkuGgARTaXZ1z900Kcxqu5jySJ0CtSDEM4/PWplkDthTpSSwAW9wPRAsBtRrG8UfiD/kHLVEqqS/TmzFe7xfyG+ok2ymOLJkGVRGTKVTyCx/PShzqivMGU/6RKIqsycSEugXJCpgHJDRSu04EXo2T7DeSEdP1iO8PYFtaxylcDIUbMqsSlW6NgUFsinuY+kuXKDwWcR1Ih71SQaatog8Hy4+SJk=;20:D87tt+ZiATRZienXiVq5Nxer0PchVo/5+eSB+0YeucLLc94pfW5fs0MG+j6VaDGoD60EbjqIWj6lPywA8aBkF1+H4SEy407vpEM+UhkHWS8Ehk8ePaA++4phoGA/fjPqXS0GHQ+B+dvC8jGFhB2wlmeB+TS27TvNnl/EmJOqzFYV+8QDIBKLsWq5etrPklL8ea+vs7E8Uqcg5sYe+HxzvYvqD1VdL0r7RR6VnF9Ah2aLytmYUnt4pw2SLE0E+u3yNn3Qm0fXwCxqzADLDbhFlIoSiI2VxGjOE+CCzmyteDb2oizlxqJUYsffvwPdMlFw1pHk6PFtmHIIjimmD1KgzEcqRSZTYUEUVByj8r7FOmJG15+QQhT9HjNFVGblvAU3ToRPFYtjVeI85J+E107ZZNpVsi7lUgj94r0ZRFEa5UCkP8DgDGmXsSlbNiY+HrG0so1qbtK88E3B8Ib63iGgc3HM/Gk4JVirQOzCiKhpUDD+Sg1f7XaFaXq5lBDoNL/C X-Microsoft-Antispam-PRVS: <SN6PR07MB44141B57A3AFAC11D8849C0ED81D0@SN6PR07MB4414.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(72806322054110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93003095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050);SRVR:SN6PR07MB4414;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4414; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4414;4:R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4h71tIkT8K0qYG5bHWfiJVl69RuyihOBNIwIl/kYJRs9TfeVJNPrlw+m2KCfVSa8Shgjkx8rS4iGqsqnBs/w5ElXj+nZ5WW4QQZSa+YFzyQoPeFDTGqRnW/GfPvSKJSELDvhiz1Go4Y7M+RSYIqA8GdeRZU1LQZuOkC/xbdQ==;5:V6HyIW7zY5aw2QB35/3dYjf/3AgYnOM6BqidrOXUpbzvSkYzCRrWBsvzJ+pCdkkuJmjZEasXlLE92p2VfSxmhv8lwGdpVpKf8IkTS8xy/aY+3oUgxrPHiiZ3mDOZoiL7zYhY6zvp0iEjzhFcrOUKybze3m9MOdfAslncaR1WVYU=;7:OY/7FSOQk8V3ad7i08OPE6mWPzDO5sESjUOgGa+CGkR4l2ZDnhycGqAsjYQUjdAVqn+ebx9RevyuEuLrMLZiS5Dh/Jjc2Fs0sZBXDHOlxbapkN/QRBeMDeApP1qK3o/A5dHhWWY9HJUiH8nWlIsBa5ZZpRg+h12bVyFFh3prWpHdJ+RPLwUZE6iBEft4RkMXlyX0PhWFD7M28BLllMUbOFlxPN5B1LJiJxHZDev8ESp7+L9Hp1+u8ZPsQauRC4YV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4414;20:Qp3dST0YWzgxj6cxImF+ePnxPNSsGGvPMUIVJli+SyQz876ruZUC+N7ANHm0oEhbfR62H+E9CLYKDqsIN5uSTpAG/x3APiQWLhwsNwSTK5vipEo+X3MVhdlIRnXH3BMcSGBQtjY/YRYYzFUP3yFPNji8NvjLMDdWnXgfhNCi6Pk07H4aknZ9lHp1jrqjKA6sekjua+Q8sEng0JZSHB0aCIzBfLn4c6nhEPGIAN8YO58BQeChmjjmErCtmEIRhDDo X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2018 15:19:41.6196 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef404e1f-86ec-4ce0-3580-08d61d7a2848 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9;Ip=[158.140.1.28];Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4414 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 a:mx-sanjose2.Cadence.COM a:mx-sanjose4.Cadence.COM a:mx-sanjose5.Cadence.COM include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-18_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=373 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809180154 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[v3,1/5] PCI: cadence: Use AXI region 0 to signal interrupts from EP
|
expand
|
diff --git a/drivers/pci/controller/pcie-cadence-ep.c b/drivers/pci/controller/pcie-cadence-ep.c index 56f6b87..1248d75 100644 --- a/drivers/pci/controller/pcie-cadence-ep.c +++ b/drivers/pci/controller/pcie-cadence-ep.c @@ -370,6 +370,12 @@ static int cdns_pcie_ep_raise_irq(struct pci_epc *epc, u8 fn, enum pci_epc_irq_type type, u8 interrupt_num) { struct cdns_pcie_ep *ep = epc_get_drvdata(epc); + u32 link_status; + + /* Can't send an IRQ if the link is down. */ + link_status = cdns_pcie_readl(&ep->pcie, CDNS_PCIE_LM_BASE); + if (!(link_status & 0x1)) + return -EINVAL; switch (type) { case PCI_EPC_IRQ_LEGACY:
If EP attempts to send an IRQ (legacy, MSI or MSI-X) while the link is not up, return -EINVAL Fixes: 37dddf14f1ae ("PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller") Signed-off-by: Alan Douglas <adouglas@cadence.com> --- drivers/pci/controller/pcie-cadence-ep.c | 6 ++++++ 1 file changed, 6 insertions(+)