From patchwork Wed Aug 1 16:44:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Kumar Gogada X-Patchwork-Id: 10552739 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-2.web.codeaurora.org (Postfix) with ESMTP id 4CB7F96FA for ; Wed, 1 Aug 2018 17:14:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33C862B9DE for ; Wed, 1 Aug 2018 17:14:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27DB02B9E2; Wed, 1 Aug 2018 17:14:21 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 2AF422B9DE for ; Wed, 1 Aug 2018 17:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403758AbeHATAp (ORCPT ); Wed, 1 Aug 2018 15:00:45 -0400 Received: from mail-cys01nam02on0047.outbound.protection.outlook.com ([104.47.37.47]:18784 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390055AbeHATAp (ORCPT ); Wed, 1 Aug 2018 15:00:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WX9pQxq75+rYVmtssBthd6R/Om2gjjtW0Sv4/7M2H0A=; b=X4YspJApH1tS1y3zRmPNy3H216B0IPgkZuGu8BrG86Mp2dPIeyY58rupELERgSiIpq1OV1nr/riHgXcpuzDn5SJvm4AGjSPTnMbcblmZUGuaZ0bfogFS+1Dc9tP3Lml7aDg7MePmmanvkKY9lo1+5JuMer5mNg6YL03JfJitotU= Received: from SN4PR0201CA0021.namprd02.prod.outlook.com (2603:10b6:803:2b::31) by MWHPR0201MB3515.namprd02.prod.outlook.com (2603:10b6:301:77::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Wed, 1 Aug 2018 16:49:54 +0000 Received: from BL2NAM02FT060.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by SN4PR0201CA0021.outlook.office365.com (2603:10b6:803:2b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.995.17 via Frontend Transport; Wed, 1 Aug 2018 16:49:54 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT060.mail.protection.outlook.com (10.152.76.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1038.3 via Frontend Transport; Wed, 1 Aug 2018 16:49:52 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fkuJr-0002L8-Ok; Wed, 01 Aug 2018 09:49:51 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fkuJm-0004te-LH; Wed, 01 Aug 2018 09:49:46 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w71GncKF009084; Wed, 1 Aug 2018 09:49:38 -0700 Received: from [172.23.37.224] (helo=xhdbharatku40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fkuJe-0004rx-2f; Wed, 01 Aug 2018 09:49:38 -0700 From: Bharat Kumar Gogada To: , CC: , , Bharat Kumar Gogada Subject: [PATCH 2/3] PCI: Use dedicated Xilinx controller irq number for AER Date: Wed, 1 Aug 2018 22:14:48 +0530 Message-ID: <1533141889-19962-3-git-send-email-bharat.kumar.gogada@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533141889-19962-1-git-send-email-bharat.kumar.gogada@xilinx.com> References: <1533141889-19962-1-git-send-email-bharat.kumar.gogada@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(396003)(39860400002)(346002)(376002)(2980300002)(438002)(189003)(199004)(2906002)(36386004)(81156014)(81166006)(4326008)(8676002)(336012)(8936002)(107886003)(126002)(51416003)(76176011)(486006)(106466001)(476003)(2616005)(11346002)(446003)(7696005)(63266004)(5660300001)(6666003)(186003)(9786002)(77096007)(26005)(106002)(110136005)(305945005)(54906003)(356003)(478600001)(50226002)(36756003)(316002)(47776003)(48376002)(50466002)(426003)(16586007)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0201MB3515;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT060;1:97kWJoh12+2ikg6BwDou28hkyhUaauhMLD5Ie2xAtKcHuWLZ2KI+MYjjbWDxNGqLiiSl0+yivuSBAix9fTUNEWnR9AUDDjziXfwHX7r8IUjZeKwWQwg7CsNMxFvQw0r2 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 745967a1-0a2e-41f4-03f5-08d5f7cece4c X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:MWHPR0201MB3515; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3515;3:s/6Jz5hMK3ozP8l7xmkzAP+Epu5J1CIMizzSFltL9q99UKeiVGvI8nWbIPQzM/ErEfOgby2JL2JZYRbrpVl/VIUNMcd5i2nbHVV13iJ5t8bhsjZqq6OfZf1HXRGMhPXv4y1OD0z9SBVxYnvS5fa3SvnKGjmX21CbNG+oc0yw4qbMIx4/Ucz0YKPbio7yvgtQyLWn6c7h8gfzrJp3RM9Ow3Z6MRL4pvXkp2gA+ChFowfE4ozJ0lRylfDri0rC4SOQAi9RGg7nIyVHQDC6zDY6M8+mvfODy+8AW5FmLalt779S9MVm5Y87h6FAujeTUIsaOiVWcE6qlgv5vo4hw91eC+jngHlYY+UXLn6kCDH6Q7s=;25:YaQi0wUmE+3Y3dzKNp9bX4r/FGPFVK/neGAgjo7kw13rDWiQHpNIxTkYE2euX0SLBtwaX7Y124H3AuGhobQk26S+4n9U9oeREjxZ7G7udBBj6ej71Sz9dySmbhSDHFOp6r5oKQH6EUIVWO428ifMnFAnM3jOaScafjQxXPgS3Yt2b/uU/xnWXqy2VD2M7d59qYJ8K0fktbGLlBT0wWsquS+2GqE6xmHMI8Bv+4zfLmq/NKe5UlZoqeELSlxqb1DpRoHTLwdgxUwuFvtDuHVnp1PkM2kw4fG1BqlnJQSpKZ8aJHuey9OkrT6GYY1T3+5EFgYNadAfScKIykpgM280KQ== X-MS-TrafficTypeDiagnostic: MWHPR0201MB3515: X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3515;31:Ovx5KaEDS3gwVcLyaCrtUN2EciEYZ7jLfsmksM1GAxm/QxLe74oJTwAZa5WzWd1Xk/r1uXYZIZ+MqRita+8CUop82cl3mo3mCiV+U8d2+iHJI86OCRPgH6055uexMW3WyJgMvx2toQNztFgBtz+4DDAEmlAHWYuvGvYF8QiArUlDlHydBVy49PS1Pm/eSD0l0eRQAPbJqEuqM8xBdwXyBdDTc/A9ypitoe98Av1gPjM=;20:3snA8SoEYMoONtIP7en/0GCfu1Y3Nt/iEpJUw9ViRTkdtdSVLS16TDguk0/byvkVGNvNfY09Ku2y+gYA3uvixn5fpNRDyXiKUW0BSkCcIomTJS2zA/v/wcv+a0/OanKNS7B4UduSdMMshQdJtBRfldB6NaGtmv1NKm0bDVTFoELgrHZecg6v0H3ftq3iuRbtZhxdAa/PHQ4rrHCWkxQRKnEePY9VkMs98KjObhMMT4d5jEnEitpwi9OZk3pPNz3qYkPJamr6JCaj7s2ejywP84LZ1sDZjOfWt9lh0FX719WaBpAg2Nus2/How1QLVALVwaxoT8219NrsRlPOjiXt/b8OvCTvJK/NUEHfL8mbrD6y9V+aCh+uYdhNK0YFCR/Y+Q9Czsg4I7nIaac/mmgZDJj0ivJlIbeoYv2yLurVUrAEUMGaepaUHOGVO/VSZszu2BqlvO5L/BtBeDSvHQjtQe5af6Db748JNhKqa70oafBCNqq1UUekTVZRsB7EV/Zm X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(211171220733660); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:MWHPR0201MB3515;BCL:0;PCL:0;RULEID:;SRVR:MWHPR0201MB3515; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3515;4:fixu/MJeoD1W/6atAM4ONiuJ7roJStjC4s2KnKgfWzXVNossa9WpeG42LucztwLFD0BkHMZF6S9A8dttiRHuVzk0n/YMclzbWYj+6/D9MSRu1q6pJqdjFqEXstu5zbd/3/KQJa7L2P2gpdvh+iF90P4K/EGKXCSRQLWTdNDwav2Sgq9iCQz+EYjL83vltelBA/WkUdizfeq6saj6+QPxSnCKenZCKE5LBmj+kvqNrDRcSwS36V1MCNm4hAsjsgkc+IJAbZbKUMaVljxO3GCd9dS7UfUkmd1/BW3Vyvrx1i1ZGUf2TCOIf8Oz2ekPC2jAKM76X22QQfcrt8XR36U9epo628Mv3gJqd0Pl6vBHiS0= X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3515;23:hZKO14MXuqXa95bkhrYogjNELnu17eHX7LftVHygUwOda/g6qu9eEslI+Sx3KJHJpDc3CiqfOM2Ih1s76xw6fTxoTIqCL9mqFIy+91fGk+4HORjOSMWdgDe/EhFOcQqbk0Cugne/4dAo/ktgWaA4ljC3/PNjPnZdGS9g3xIkEeugrdTG67FKkshm1BwJdOXbZb+WJc39pxXcVBYsp6HR9MSZrw+CVue18tFBdwMIsftF2r8tQk2L4hZyxbVDvjkicAb8tVifPlz6+XmJ7dUVMOMVJg8J702thAGLaeHwYjAfINtG7q2b9+kcZdHmuEHN78uCEFJ0mNfgeGVktB7XWe1CNYt4Oj0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gTgZOxfB9uYzp0+1RcJ7hLULHAAk/iFovdMHO8luYR4dXpbGA9oEgZuKQVGU4/wqN7wo7SDiYzxmSCc798= X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3515;6:HN6oqLUviaGGopcUsQ0y1NLLf1x5+r5ByoahCQGqWH8PIoRSNM656/XaeuJwuyGozK1vosk12MB5Wl641AJ0Iafx1BEvxU7gko6dl3YIuw4m8xGNYG82gUjtG8nPzKgMZQMIAdzXlApHrXsUHfTsN5ih/diBrX553VFMbMjm/0p+nA7VY2mIpXBJ3fCfLZyAlUjEFdB/msJ96kusr1ddfWNaEOstUcR55N51o2elq6dM4HMPJqBz9nPsflD4ibtY/z5dDOD4bH7RILIUmIYeuEcXRt5ndS7E2/E58XTenOlDozX3nHwfUdaAGaqIHiwtY04biJqv/A5Urqwez2FMJOKj3/Co5WCTqMX2VT7pBM+9Uts81zGmfRrNxu25woUSWWFyRUvD0yHMY5v+ab3HREvyzzE3peKa7aQVFGv+BQem0kprvpVddhmtJenZV1JlJq+CXGmls6HfKckiYXyC2A==;5:VSOkDuQai9vjpvJxviQtz6vlVI52ISGCQTxBNZ04VsBTJOJSmaKdZwKRrAPCjj3n5jmuzZ9AnDgA1pM9zFFXjZxCyjGsFjjniXUb+jwCrdlZvH2V4XYjlS5rC+X30mXbYboSG1lCQQv0r9/dkS2T8XWgMFRmDg3QrnVkLJn4yuU=;7:HYjCR/ccnxFpBqPZXVK4oFpzJiEIHPW+OsyrK9oVP8mED+fEtJPB7kGDWbf2j95/b3Md78VlGCf23xeOIZuEFyjG4BNvjdD77V//mcMT7QU2bC6sPYvDpiXL4/BW0RqeXd1qVnE6Ik3I3lrw8VyBINLFcvxXE0SY9n+tr1X3PwNwLy77RhJQrk6WQp3DKE5YNwdeGiApNPfkR5gRZT1FCrncaOdGKKYE5oOTwrDqdF4WBH5W8hz6iCMW7l2JCV9j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 16:49:52.7017 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 745967a1-0a2e-41f4-03f5-08d5f7cece4c X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3515 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 Xilinx ZynqMP PS PCIe does not report AER interrupts using Advanced Error Interrupt Message Number. The controller has dedicated interrupt line for reporting PCIe errors along with AER. Using pci_dev->sysdata of root port to save controller irq number, which will be used for registering AER irq handler. Signed-off-by: Bharat Kumar Gogada --- drivers/pci/quirks.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f439de8..e666373 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4753,3 +4753,32 @@ static void quirk_gpu_hda(struct pci_dev *hda) PCI_CLASS_MULTIMEDIA_HD_AUDIO, 8, quirk_gpu_hda); DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_HD_AUDIO, 8, quirk_gpu_hda); + +#if defined(CONFIG_ARCH_ZYNQMP) && defined(CONFIG_PCIE_XILINX_NWL) && \ + defined(CONFIG_PCIEAER) +/* + * Xilinx ZynqMP PS PCIe does not report AER interrupts using Advanced + * Error Interrupt Message Number. The controller has dedicated interrupt line + * for reporting PCIe errors along with AER. + */ +#include +#include + +static void quirk_xilinx_aer_irq(struct pci_dev *dev) +{ + struct device_node *dev_node; + + if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT && + pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR)) { + dev_node = of_find_compatible_node(NULL, NULL, + "xlnx,nwl-pcie-2.11"); + if (!dev_node) { + dev_err(&dev->dev, "Error could not find ZynqMP PS PCIe node\n"); + return; + } + + dev->sysdata = dev_node->data; + } +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_XILINX, PCI_ANY_ID, quirk_xilinx_aer_irq); +#endif