From patchwork Wed Jan 6 17:50:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12002027 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.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 BA335C433E0 for ; Wed, 6 Jan 2021 17:55:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 7667B2311B for ; Wed, 6 Jan 2021 17:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7667B2311B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SvUDVlfVuEVbrABbpJs1lqO6IDLCXZAFAj/W2Ykerwo=; b=MAM75g4qW2SWlfkcXXgOXdWhT aMVhodwJiwHqoDq0WpkE4UropWCTllrYgNzyKqqJf3Gng2OgNmxXptSAO2VuCtw21GKXa/iPqfNyI MH28iP0HUx1wP9bsgcsKYmXncEbnObUJaU155xwvCh3xzdx3un/jAEOhXUKg04TyYzOIh+G8a70pR 4jbMbexB+wV5JHoN7p0fcrt+9xTRqCRqzN/0sdD6MK+pkP7hSFayJywzvrZgcoLCl5MCvBhfo6NDp z3qB6O1TPoveSrbTe8VVenn9HCg/391v6DGd7L/BPZyN/9rQ59GEsFSH73TgM/imCf3zRvufFFOdT t2BYo6O3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCzC-0007JQ-At; Wed, 06 Jan 2021 17:52:42 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCz9-0007Gs-EO for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 17:52:40 +0000 Received: by mail-ed1-x536.google.com with SMTP id j16so5247672edr.0 for ; Wed, 06 Jan 2021 09:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4ghlzx0ngHPmtJ8Qunegeez7cCjaR86UkMnCfsZmtjo=; b=VEP6JOKXTfSSSHt54dhX2M0EY3gZKRFIfgHhhiI7Og8tqz6x6nymRwbS1aX8rmcKAH WxJKi38i7YCYgCfw5Pli4ICQ/9NQ9Mddm2PYLvAQRWduqJvJaiKJ0CJtGYLVF1L2eFGp UVp4irLbrVHxqAKOuZGzonCXZucKPtfeWEei5rHiLFHldVCaRhykWymVN/nQv4kNiJyr Wp0gWPj9FpnRtl4LTtmM41V6eGNQXrIG4pt+PTPPnNWJ8+GV2r62MD0vAL/tGV9VzMpu U22YdMWGQeokTLJVak8/fdcXrPsYNLtITro2Lthv0vwbWZVQLEVYZvHf2DeMFqnhVUtm T/GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4ghlzx0ngHPmtJ8Qunegeez7cCjaR86UkMnCfsZmtjo=; b=XAY975N7EsmCFiT5xUJxADuXsyu1KKApmCbCn1vCmUg25Q1zetvhHMKc6tYG4x8Yql 01UzTe1ytQCcA2xBDlz/IiSFD1aK69mmrtBtoe1+iXc4m5hWAW1n92Om8Guq3sZR9CiA Hshe0NAK4E6ZwMRn5Au9A6KSFgHFJNflixiSf4nTtuHH1Jh73t8h1hMtBJj5dbn6hUFw 4Zz2Vjj5yIINu2FhQEIviI9vqEwerANmvwSqaY7vvs4DgLou8Knu65pLQTjO4jYp7nAE DCVVxIGmTA2JdQIdvva4gSeH8Q/hYKnlSbanJ2iz2XWbMB3ynJHr4sh0iMTq4h6Y35QL ziCw== X-Gm-Message-State: AOAM532Rpb+0apGsGzmQPmnioXIdHW2t+57o3zYRBjIK4lod6QYxd6bX 4INOczIF3kA4OIPJsc3Boss= X-Google-Smtp-Source: ABdhPJxBXK4SYZHFJDf9fLt/cH+7SWdNrNdo4NDmnLPKwGuS+QgJHO8xx/Rdky/fMVKBPVYl0v4pTA== X-Received: by 2002:aa7:c886:: with SMTP id p6mr4686827eds.207.1609955556398; Wed, 06 Jan 2021 09:52:36 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:e1db:b990:7e09:f1cf? (p200300ea8f065500e1dbb9907e09f1cf.dip0.t-ipconnect.de. [2003:ea:8f06:5500:e1db:b990:7e09:f1cf]) by smtp.googlemail.com with ESMTPSA id hb18sm1533707ejb.86.2021.01.06.09.52.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 09:52:35 -0800 (PST) Subject: [PATCH v3 1/3] PCI: Disable parity checking if broken_parity is set From: Heiner Kallweit To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski References: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Message-ID: Date: Wed, 6 Jan 2021 18:50:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_125239_532174_D1CC042C X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org If we know that a device has broken parity checking, then disable it. This avoids quirks like in r8169 where on the first parity error interrupt parity checking will be disabled if broken_parity_status is set. Make pci_quirk_broken_parity() public so that it can be used by platform code, e.g. for Thecus N2100. Signed-off-by: Heiner Kallweit Reviewed-by: Leon Romanovsky Acked-by: Bjorn Helgaas --- drivers/pci/quirks.c | 17 +++++++++++------ include/linux/pci.h | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 653660e3b..ab54e26b8 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -205,17 +205,22 @@ static void quirk_mmio_always_on(struct pci_dev *dev) DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on); +void pci_quirk_broken_parity(struct pci_dev *dev) +{ + u16 cmd; + + dev->broken_parity_status = 1; /* This device gives false positives */ + pci_read_config_word(dev, PCI_COMMAND, &cmd); + pci_write_config_word(dev, PCI_COMMAND, cmd & ~PCI_COMMAND_PARITY); +} + /* * 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. */ -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_quirk_broken_parity); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE, pci_quirk_broken_parity); /* * Deal with broken BIOSes that neglect to enable passive release, diff --git a/include/linux/pci.h b/include/linux/pci.h index b32126d26..161dcc474 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1916,6 +1916,8 @@ enum pci_fixup_pass { pci_fixup_suspend_late, /* pci_device_suspend_late() */ }; +void pci_quirk_broken_parity(struct pci_dev *dev); + #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS #define __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ class_shift, hook) \ From patchwork Wed Jan 6 17:51:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12002025 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.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 93C26C433E0 for ; Wed, 6 Jan 2021 17:55:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4B1412311B for ; Wed, 6 Jan 2021 17:55:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B1412311B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MUbwzytHdBcm0zJrybzkDM3FHZYXh91EPscoQ65o5/Q=; b=x2/5TJcV1m9tFy1C7Rn+82vAY gooWOlEyoWdmpGb5wNBx/D3UE/Y+Mt+Qnph9TAjrqf23iqCcXGnYjb9A1smE4ZHYYEI9L3DMBwoh6 Z+2H+Knux+8wpbi7nHukIU6Vat+260vFLAKLZbsP/4EaSTWDO7d8OFuL3hwYxd+gxYlPjz+bNulO3 N37fHGKz1AZmZ9BJx94FSjnuaIo2OKHMLW0e7tcp+Hb7jV3iYr3RPhlfgHMGfvWSVdp9FdV1bZseo 3nQ+omVwW9OIFEuHgMT3xo49xoMv0ZD5zsAV9ImYOjWKlpZxHm308J6sjcYNTnyHB/WRiciEe04oo NU9mYefwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCzE-0007K3-Ou; Wed, 06 Jan 2021 17:52:44 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCzA-0007Hj-QG for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 17:52:41 +0000 Received: by mail-ed1-x52e.google.com with SMTP id dk8so5248517edb.1 for ; Wed, 06 Jan 2021 09:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zo4puXWJu0y1i/wQ/38qDQeCk416sEyKVYwIE550Uso=; b=k4aMCi9BM2ZvNUO37aKxnOf2oDq3WvPS0tHkyDmv3alZSTPp0k3FOH+jRP5RrYLfQt G4KSjMuvC85EQPxsZINaWvapPDwcGtY8TVP4n/SjCLxsby1h5Q2yZoDc0FlCR2uTBW2e ObJS0Jjha0As/HLZUCNbkPM4J6kWl9OGhoVimLK11Kzkg2i6PzRBWtE9mPU6hsR1oAdS J1lXtcoSqGsEYub64TGDSA/L9I502uTs0BaMJFQb41FJj9VU2vRREGBk9n//2d0Q5X/2 +mHF8BsVZJmehmTFxKT2EWQx9gKWvh1xXHFmUoubP2pMl/1fn8B1Hkdk6AtKKr61XSFG gQOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zo4puXWJu0y1i/wQ/38qDQeCk416sEyKVYwIE550Uso=; b=DGIhXfGgV99pJMAkvG0YENzjordpBGIwt/O6F79o+LiceIAIDtE9X9O0xbmhaKFvOv 83Nkr2BhoBOjiDTgzllqF3Wylb6I1dd4V9i4pLkZ76SVJbcitUDvkfvbcZL7u8BPyvpn R8wsl57h0OfGOOL8irXFjxmXFqLhM43PCHv3zS2xHa4lxEyzcj3dgBGrjVMnvwBikLKJ Mtn7WQ8npZTQ5LWE5LJqX+eAVfbQWQyKOiGJQ9ZqRxQ38d07kdbhGXgLMjwb49gyjtvE MwFy2ZJ1VcM5uoJQAP3tUq3zYuUSOwmvxS28apH+KxdZzwr00Szn8kFNIs2RKUwOvHE2 TwvQ== X-Gm-Message-State: AOAM533oQs6YUwbQo/NdshxsG4fhn0RknyeSnBFjCss2oqM4fmn1E/jc p24Gq3uMNlkHDiVjCWo/Tx4= X-Google-Smtp-Source: ABdhPJxKbl+eDJVjJz8AQaORCoddjTDiCIciOrwhOqu7vlt69dpwQRjyQfvUh8rFreDMbGLx05W5FQ== X-Received: by 2002:aa7:c5d6:: with SMTP id h22mr4659789eds.82.1609955557752; Wed, 06 Jan 2021 09:52:37 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:e1db:b990:7e09:f1cf? (p200300ea8f065500e1dbb9907e09f1cf.dip0.t-ipconnect.de. [2003:ea:8f06:5500:e1db:b990:7e09:f1cf]) by smtp.googlemail.com with ESMTPSA id t19sm1532069ejc.62.2021.01.06.09.52.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 09:52:37 -0800 (PST) Subject: [PATCH v3 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk From: Heiner Kallweit To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski References: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Message-ID: <0c0dcbf2-5f1e-954c-ebd7-e6ccfae5c60e@gmail.com> Date: Wed, 6 Jan 2021 18:51:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_125240_891692_FDC3C4E1 X-CRM114-Status: GOOD ( 16.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new PCI core function pci_quirk_broken_parity() to disable parity checking. Signed-off-by: Heiner Kallweit --- v2: - remove additional changes from this patch v3: - improve commit message --- arch/arm/mach-iop32x/n2100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 78b9a5ee4..9f2aae3cd 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c @@ -125,7 +125,7 @@ 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_quirk_broken_parity(dev); } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169); From patchwork Wed Jan 6 17:52:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12002023 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.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 F1AF6C433DB for ; Wed, 6 Jan 2021 17:55:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9C7E32311B for ; Wed, 6 Jan 2021 17:55:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C7E32311B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BJqKxSXgH6Ey7yWfOvmwu219W276QZwgcYBq/QJoQGc=; b=WZgD3OziVyuQkk2EuQJ/bRXqu yuajM6tNhdQu/1ebUCDlO02B4nnubkvclKmo+fiidTqlkvEVI+Bha8Sp/l1EMxRbliKlh9k+3cVhE P8kZsFKQNFdKpB7AeGAK3O5wYTt+w+VDmEQWMAAzTzGNavrKpNb1DXc7uDcOGStRktrHfQsGS7MSO Htm9ll02sERLPpQByl/1d/VmajXzpddl5l49jiVHaFO+8l/6NbboDDRjEygyDDkNALc9ipOpxpAQv PjVuNySUsa0bFLb4RALb+1H8TcuyCvpctRqYiXRNOvbSBYESo23fyHAB3i/bvj5QnrZjvSb4ne8Cm CfR4Zz5aQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCzH-0007L9-B9; Wed, 06 Jan 2021 17:52:47 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCzB-0007Hx-Cg for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 17:52:42 +0000 Received: by mail-ej1-x636.google.com with SMTP id b9so6284674ejy.0 for ; Wed, 06 Jan 2021 09:52:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=tFjOXOsquLgJec5Svj2aNg4kNYEga6uS+V4sECR+77oIWlS4xBlhguxxaXIZkuBYHd OZZ1n95oRVDx+yVtvgBdvvyopTPR2JG8/n58G717wNHR7eHBAsE7Sx13XZ4FkZV4PGx9 osesB+IphuyUNg7iZLWFLj27JJ2DRykAaRIyzxuGFykfGlo5Q5vsNzk1wfXsfpRGbxfI IxHB8D+rQYOANCJ44ReQstv3M5fVeYevvRHELPRLc9JzCGX8jJYOcCrQNJQTwBIgIUfv rHMAkvrxfD8y8UAs4sWYt+KvY1lpEfKiyv+Mjv8ZrEgX5qHxk9lNvKtAVknzi9brkptg Gyzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LMhEikvRUZQaIKyyHYQPd9FehVZ9OCrs1+Guuen9CX0=; b=LYvyPYQ0HRHZTJy+gMPo4JMUgnezzCgJV+uiN9tTC4eO6Czp+tD6cCxKOZXit1LEtf otmM7Fshu/UIuQqruM0EFvSjR5yXXAKddB+yN5JM68DBs/4FDPB74Z+LFwcSsji18o4c UPPcLMNzAOVxIpqapXQphxIJcEX4Cz8NMC4Cq6D4MvxlRger3MljarFWRfU+5Nj3Kngh 3FnNGyrNF0x/CTLMo5Pu6RrYJ28WyXth3Wb8fFiz7gj7N67FLNLethkVOUDSlw7zS/Ju Suc41f/Jwh4fBZuFeYtkLpg3S8dqv+koAy7Xd005iB8vbsAACvWDK5jFd0J0Jl3x8yu3 ndTQ== X-Gm-Message-State: AOAM5326lGYvxJk/aq+9MM+aLzNpH5aEK6N2PIcZ/tXld5UGw+hHjJvV C3yuSwwlTPoQ4V7AqNpFweA= X-Google-Smtp-Source: ABdhPJzZhqLPes8FWc+g2+meURM8xcd5OE4SEtJiwwW78Jp8SQlh6ANKZ06XF4U9QcDU5ltSn0Ryfg== X-Received: by 2002:a17:906:c790:: with SMTP id cw16mr3694633ejb.344.1609955559148; Wed, 06 Jan 2021 09:52:39 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:e1db:b990:7e09:f1cf? (p200300ea8f065500e1dbb9907e09f1cf.dip0.t-ipconnect.de. [2003:ea:8f06:5500:e1db:b990:7e09:f1cf]) by smtp.googlemail.com with ESMTPSA id d13sm1728045edx.27.2021.01.06.09.52.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 09:52:38 -0800 (PST) Subject: [PATCH v3 3/3] r8169: simplify broken parity handling now that PCI core takes care From: Heiner Kallweit To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski References: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Message-ID: <9e312679-a684-e9c7-2656-420723706451@gmail.com> Date: Wed, 6 Jan 2021 18:52:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_125241_459833_A869541C X-CRM114-Status: GOOD ( 15.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Meanwhile the PCI core disables parity checking for a device that has broken_parity_status set. Therefore we don't need the quirk any longer to disable parity checking on the first parity error interrupt. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index c9abc7ccb..024042f37 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4329,20 +4329,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); }