From patchwork Wed May 16 01:31:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Dalessandro X-Patchwork-Id: 10402417 X-Patchwork-Delegate: dledford@redhat.com 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 7B6BB601F9 for ; Wed, 16 May 2018 01:31:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C08F28717 for ; Wed, 16 May 2018 01:31:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60DD62871D; Wed, 16 May 2018 01:31:35 +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, 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 EBC4B28717 for ; Wed, 16 May 2018 01:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976AbeEPBbd (ORCPT ); Tue, 15 May 2018 21:31:33 -0400 Received: from mga06.intel.com ([134.134.136.31]:10826 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbeEPBbd (ORCPT ); Tue, 15 May 2018 21:31:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 18:31:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="41268680" Received: from scymds02.sc.intel.com ([10.82.195.37]) by orsmga007.jf.intel.com with ESMTP; 15 May 2018 18:31:32 -0700 Received: from scvm10.sc.intel.com (scvm10.sc.intel.com [10.82.195.27]) by scymds02.sc.intel.com with ESMTP id w4G1VWVV031594; Tue, 15 May 2018 18:31:32 -0700 Received: from scvm10.sc.intel.com (localhost [127.0.0.1]) by scvm10.sc.intel.com with ESMTP id w4G1VWX7014964; Tue, 15 May 2018 18:31:32 -0700 Subject: [PATCH for-next 4/5] IB/Hfi1: Mask Unsupported Request error bit in PCIe AER From: Dennis Dalessandro To: jgg@ziepe.ca, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, "Michael J. Ruhl" , Kamenee Arumugam Date: Tue, 15 May 2018 18:31:32 -0700 Message-ID: <20180516013129.12474.16333.stgit@scvm10.sc.intel.com> In-Reply-To: <20180516012947.12474.2286.stgit@scvm10.sc.intel.com> References: <20180516012947.12474.2286.stgit@scvm10.sc.intel.com> User-Agent: StGit/0.17.1-18-g2e886-dirty MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kamenee Arumugam For Hfi1, this unsupported request error is not considered a fatal error. Set Unsupported Request Error bit in Uncorrectable Error Mask register to disable error reporting to the PCIe root complex. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro --- drivers/infiniband/hw/hfi1/pcie.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c index 87bd6b6..332c843 100644 --- a/drivers/infiniband/hw/hfi1/pcie.c +++ b/drivers/infiniband/hw/hfi1/pcie.c @@ -79,6 +79,8 @@ int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) { int ret; + int aer; + u32 data; ret = pci_enable_device(pdev); if (ret) { @@ -130,6 +132,19 @@ int hfi1_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent) } pci_set_master(pdev); + + aer = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR); + if (!aer) + goto done; + pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_MASK, &data); + if (!(data & PCI_ERR_UNC_UNSUP)) { + data |= PCI_ERR_UNC_UNSUP; + if (!pci_write_config_dword(pdev, aer + PCI_ERR_UNCOR_MASK, + data)) + hfi1_early_err(&pdev->dev, + "Masking Unsupported Request error\n"); + } + (void)pci_enable_pcie_error_reporting(pdev); goto done;