From patchwork Tue Mar 30 17:43:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12173437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E19E5C433C1 for ; Tue, 30 Mar 2021 17:45:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F3AB619B1 for ; Tue, 30 Mar 2021 17:45:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F3AB619B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yb0OyniFV8cLnhBMYBd+XtkQfMrRHUBbiZgtbgrhGGE=; b=BjhJN5NlRIbW3HxfobkznwMdY xtObvq8SQJj/NIqSQCZvRSpFsu5wQkEfIAjBTzlKF0h44BCfKDNSmcBvND7J8u9gE0SAVDv84Nf4v Z5Qa74vIbEHa7ij/PHiSJS2yHWog1MdyQ8QjrXkThP/7RAvNlhDvYVhRdJSMhO6Ocmb7xWZiBdAiC tZ4mXlABjiPEWG8oKGoVe2ppt6fPSzHgJ4SsGTX3pRrbn7N4/j9BNrR8aiQqoMenDqy2+otlbbvhD 1Gq4gsrShckIMwZB3YyIil8JwW5tXzcspLNr0mnx79QI37AMW310puPza8pO9j/7JBUfjj1aJCYe8 2ZNVFKCjQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRIOz-004U8C-G2; Tue, 30 Mar 2021 17:43:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRIOm-004U4I-FC for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 17:43:30 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E0B9619D3; Tue, 30 Mar 2021 17:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617126204; bh=cHgRyNPea/tk/h7ppogF/FAqeVM0OOIbYOAsae8a4D0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s1TPDcvpdDQl2zz/6dTzoGc2yPvj9XebTivOzAM94u9CqcWuIn58HEE5DIrWgn30q sQzyt0FN+NxgG9CLTd9gzAZDeCc+5eZjIBsWOtzDDUs0CfcI/LzBQi8H3rVL5GqX60 ktbThATq2tyDS++YxOeSJX4FDM07vD03T89DtlPOFzuGQJKAMU7uUKl7CY/hcsX1cF zXDttl8kS85SMWyLpdFL0K1Nv4tIq17S8+7wYNuQTBwGzeLInm5157UjnHV2ZP8H7f nSKZkIleTCQD1Xa4gGQCVp9FCsX4ntHqX+8fTMpp8fU1jvFWhQ3pb4Mei/VENjtpzc SxQsu2nRgwFpA== From: Bjorn Helgaas To: Heiner Kallweit Cc: Leon Romanovsky , Russell King - ARM Linux , David Miller , Jakub Kicinski , nic_swsd@realtek.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v4 1/3] PCI: Add pci_disable_parity() Date: Tue, 30 Mar 2021 12:43:16 -0500 Message-Id: <20210330174318.1289680-2-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210330174318.1289680-1-helgaas@kernel.org> References: <20210330174318.1289680-1-helgaas@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_184328_878568_5B48EB38 X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bjorn Helgaas Add pci_disable_parity() to disable reporting of parity errors for a device by clearing PCI_COMMAND_PARITY. The device will still set PCI_STATUS_DETECTED_PARITY when it detects a parity error or receives a Poisoned TLP, but it will not set PCI_STATUS_PARITY, which means it will not assert PERR# (conventional PCI) or report Poisoned TLPs (PCIe). Based-on: https://lore.kernel.org/linux-arm-kernel/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com/ Based-on-patch-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c | 17 +++++++++++++++++ include/linux/pci.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 16a17215f633..b1845e5e5c8f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4453,6 +4453,23 @@ void pci_clear_mwi(struct pci_dev *dev) } EXPORT_SYMBOL(pci_clear_mwi); +/** + * pci_disable_parity - disable parity checking for device + * @dev: the PCI device to operate on + * + * Disable parity checking for device @dev + */ +void pci_disable_parity(struct pci_dev *dev) +{ + u16 cmd; + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + if (cmd & PCI_COMMAND_PARITY) { + cmd &= ~PCI_COMMAND_PARITY; + pci_write_config_word(dev, PCI_COMMAND, cmd); + } +} + /** * pci_intx - enables/disables PCI INTx for device dev * @pdev: the PCI device to operate on diff --git a/include/linux/pci.h b/include/linux/pci.h index 86c799c97b77..4eaa773115da 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1201,6 +1201,7 @@ int __must_check pci_set_mwi(struct pci_dev *dev); int __must_check pcim_set_mwi(struct pci_dev *dev); int pci_try_set_mwi(struct pci_dev *dev); void pci_clear_mwi(struct pci_dev *dev); +void pci_disable_parity(struct pci_dev *dev); void pci_intx(struct pci_dev *dev, int enable); bool pci_check_and_mask_intx(struct pci_dev *dev); bool pci_check_and_unmask_intx(struct pci_dev *dev); From patchwork Tue Mar 30 17:43:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12173439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD9DEC433DB for ; Tue, 30 Mar 2021 17:45:23 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 417D6619B1 for ; Tue, 30 Mar 2021 17:45:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 417D6619B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8JIbVfhzX0mzfAI81P3LjHPFakpY9ZbxzA5WufoiFNU=; b=AwiptlnoOmHqqCmk2luIxXVwq 5+pbDcnYG9DVwabAZxmokwAeg9EyTqv2+rU+IfM1536LFMOp9otiD9cvaBkEhFZD6hH7fLHBOszO6 +wiMbBily2DLezbtYFYcIk7y3LwySTcGbRaxQWdbQPVeYFUjw8xLV3c2DEKYUWCyB77QEMMyYrmfa 0lqBW/5narCuYu/2dFJpZNV9y9aaEoBeVjGwmge1MR8p++nsOeBIHu74GMYqIGFzYSQ9hrIwE+2gN oIyMHCP4PiyOq6w9BJoo5p3RmziyJxdYB2Ss9bufLEbovlJdra2VVxB+82c6SmesgllGYaNt0lJNM q/dr5KCNg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRIP9-004U9s-7z; Tue, 30 Mar 2021 17:43:51 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRIOm-004U4r-FC for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 17:43:30 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D67DC619B1; Tue, 30 Mar 2021 17:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617126206; bh=Km5/NLiFu9OztdWOHL1dLNiUdzRJVym2mzxhMR0v5vI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SwPz5nc3+J7j2MN8YbjU7mUMEr18QE5iZVQXWndh0M9HTYDs3dipL+4GwbuZ8uB+h az2KcvOEBOk70fA/hV9D0Q6PuqZ6yHm2jHk6YpmATrC2uarho7TWWFyGujwhssOXfL vzx7eRe3OA66bIKoB2tXQWCjl8wN1OvDGsa7FpU+ZrpUI53ZxAJaxGqoW6zq5HuFac JANRq49fqDXrGMt+2+ljXTS8oqlhgc57kB63RKn2KhQVnh3wqlvLCfJzWfpMp+xDqi 1LoCO/BnxDGo33MQCGZXggMqpBYfCXRNbbL7cHbq3heGXWZpHOnhXbhcNeRqByEj2l UInxIbtM45Dig== From: Bjorn Helgaas To: Heiner Kallweit Cc: Leon Romanovsky , Russell King - ARM Linux , David Miller , Jakub Kicinski , nic_swsd@realtek.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH v4 2/3] IB/mthca: Disable parity reporting Date: Tue, 30 Mar 2021 12:43:17 -0500 Message-Id: <20210330174318.1289680-3-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210330174318.1289680-1-helgaas@kernel.org> References: <20210330174318.1289680-1-helgaas@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_184328_883632_6F200F36 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Heiner Kallweit For Mellanox Tavor devices, we previously set dev->broken_parity_status, which does not change the device's behavior; it merely prevents the EDAC PCI error reporting from warning about Master Data Parity Error, Signaled System Error, or Detected Parity Error for this device. Instead, disable Parity Error Response so the device doesn't report parity errors in the first place. [bhelgaas: split out pci_disable_parity(), commit log, keep quirk static] Link: https://lore.kernel.org/r/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com --- drivers/pci/quirks.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 653660e3ba9e..6aa9df411604 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -206,16 +206,11 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on); /* - * The Mellanox Tavor device gives false positive parity errors. Mark this - * device with a broken_parity_status to allow PCI scanning code to "skip" - * this now blacklisted device. + * The Mellanox Tavor device gives false positive parity errors. Disable + * parity error reporting. */ -static void quirk_mellanox_tavor(struct pci_dev *dev) -{ - dev->broken_parity_status = 1; /* This device gives false positives */ -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR, quirk_mellanox_tavor); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE, quirk_mellanox_tavor); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR, pci_disable_parity); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE, pci_disable_parity); /* * Deal with broken BIOSes that neglect to enable passive release, From patchwork Tue Mar 30 17:43:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12173441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC580C433DB for ; Tue, 30 Mar 2021 17:45:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A453619CF for ; Tue, 30 Mar 2021 17:45:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A453619CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=17wFyRtLyGc0YFzjrbeo9URAqsk2R7Cml0jbpchowVs=; b=khXM6zsRC7Bbn5qIxRGrTln4Z wt7f2Ij+YYa9O3yF2jGMX1jpn1fectbH2QvLwtDWu/+SjqNqhMlrVATLo9haOBI5NMmsmERbTxOvj zuf/h4rqUABtlUbATpZ6c8qWzPNEX0+8r+8+htqxGQR75ncfjLxNL9aiRcSzwc1/PVpJq5XEqXLT9 DXt+DB7llTQyeopTkpeArnwbSXyaqyKs9tAQSlcohGVRmWxZr3yjVf/fBag1Zq/Gu+CwEJnWVpx6m RtJmwdKNtbsuABykh9gGZx8zUEHQEZOTIdbuTj3pibiz0ikILsoxiGZr1S0S81+Rahd4r7DjlK6Vk 54OQBsYMQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRIPL-004UDJ-Ce; Tue, 30 Mar 2021 17:44:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRIOn-004U4v-8i for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 17:43:32 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E757619D6; Tue, 30 Mar 2021 17:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617126207; bh=oJFKuCUfkKRL7zkTo3uhLRMFcjPrNPutwqIV6AWcUUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aczD3+BA9FjpTgcNUhiYA6AdAoLO0jJQioJVqdFN+VQkRX4CxxXewXc6uybN4UgOU m4aYzk+MvJ5tBJmJijW5DqSxl3WVCZgZ5FwN5AOdJnfwygy0Op4wCCUtSuWoQXJe6j OnaWH+wC2hT7LVF+/4tbZGpvBdQEt7AQxKbmSVNn18Uy/HU/rZp9eoxOqnLBkkLd6m VxyyLcQM5HN8prUBZrLim6HhoaMUD3Ov1bSsJ4hblswe7i3LZRJBBNQ7/XFyPX3EnP jcvlGRhiO7DoPO+xP5Zl8kGJGNffDo7ykjlYW7LBESWu63efhsUJjwdAwnQgaJ3Y9Q yaJospq8aBiiw== From: Bjorn Helgaas To: Heiner Kallweit Cc: Leon Romanovsky , Russell King - ARM Linux , David Miller , Jakub Kicinski , nic_swsd@realtek.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH v4 3/3] ARM: iop32x: disable N2100 PCI parity reporting Date: Tue, 30 Mar 2021 12:43:18 -0500 Message-Id: <20210330174318.1289680-4-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210330174318.1289680-1-helgaas@kernel.org> References: <20210330174318.1289680-1-helgaas@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_184329_628676_7588FDF4 X-CRM114-Status: GOOD ( 16.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Heiner Kallweit On the N2100, instead of just marking the r8169 chips as having broken_parity_status, disable parity error reporting for them entirely. This was the only relevant place that set broken_parity_status, so we no longer need to check for it in the r8169 error interrupt handler. [bhelgaas: squash into one patch, commit log] Link: https://lore.kernel.org/r/0c0dcbf2-5f1e-954c-ebd7-e6ccfae5c60e@gmail.com Link: https://lore.kernel.org/r/9e312679-a684-e9c7-2656-420723706451@gmail.com --- arch/arm/mach-iop32x/n2100.c | 8 ++++---- drivers/net/ethernet/realtek/r8169_main.c | 14 -------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 78b9a5ee41c9..bf99e718f8b8 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c @@ -116,16 +116,16 @@ static struct hw_pci n2100_pci __initdata = { }; /* - * Both r8169 chips on the n2100 exhibit PCI parity problems. Set - * the ->broken_parity_status flag for both ports so that the r8169 - * driver knows it should ignore error interrupts. + * Both r8169 chips on the n2100 exhibit PCI parity problems. Turn + * off parity reporting for both ports so we don't get error interrupts + * for them. */ static void n2100_fixup_r8169(struct pci_dev *dev) { if (dev->bus->number == 0 && (dev->devfn == PCI_DEVFN(1, 0) || dev->devfn == PCI_DEVFN(2, 0))) - dev->broken_parity_status = 1; + pci_disable_parity(dev); } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169); diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index f704da3f214c..a6aff0d993eb 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4358,20 +4358,6 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev) if (net_ratelimit()) netdev_err(dev, "PCI error (cmd = 0x%04x, status_errs = 0x%04x)\n", pci_cmd, pci_status_errs); - /* - * The recovery sequence below admits a very elaborated explanation: - * - it seems to work; - * - I did not see what else could be done; - * - it makes iop3xx happy. - * - * Feel free to adjust to your needs. - */ - if (pdev->broken_parity_status) - pci_cmd &= ~PCI_COMMAND_PARITY; - else - pci_cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY; - - pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); }