From patchwork Wed Jan 6 17:49:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12002017 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=-7.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_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 83026C433DB for ; Wed, 6 Jan 2021 17:51:51 +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 36B5A23123 for ; Wed, 6 Jan 2021 17:51:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36B5A23123 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:MIME-Version:Date:Message-ID:To:Subject:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=jF9X4+bu27kAtfYaP8SDWwsnNTNouYKIAQ1CDLQM9Jw=; b=OKitsFd6ynHTvNdORXrwOZ1vA4 ZgzzBryo0DW+bToGSmET6LrY5DDnGKz6uzbMx4Qhb1NtNxLOpekNkJkVX0OcJu5ZQBsd/soHNZUlW AR49CfOcMOpFWHzkLgkRnrfvKNeaSW2NPDtMxbMWn9NdCEa2NKSQN8UOJAaLeDt7hNCvN6eyWpJMc oYgV5FsgycwQBmnrNLVmZPguu0iOENgVVNE2Xf/yAAKkDhSs1zXBHUCBIFhUsasxEhqVbv4k73yJl Hfa1EwGcgicC8yjIeuoZxrtH7yvwISm24d1pZhe0jjEYB6B+5WKrVst8hncBph8N3RXMnFL2o3LPz xKLKHTsg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCwH-0006fW-7Z; Wed, 06 Jan 2021 17:49:41 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCwD-0006ej-ST for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 17:49:39 +0000 Received: by mail-ej1-x62d.google.com with SMTP id g20so6257453ejb.1 for ; Wed, 06 Jan 2021 09:49:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=JuHR3UWCCeq452V9BHavJMn59/50F/mGgP61pi3yT34=; b=ljD9/4NN9tbpdf9CBJSPvqUvjlQBBAjU7Q51UgK97i8O3lj2uAY3Kyb58eZnyAVXbo wiWJjq6CxQA3rZCnhvfwjAaeNiqcLKhxmIXQC8bEAZuoX71zf3YlMdJx/v94ozy5/N2H aiUlLhInBuNnQ0YVjsdxA883vmNmPxELsz7ohzvmCYoroqc0jvuJ+WmAHrT8K0CHBpt/ yk771U5enCIE2f+MqSdDaI1XyCj//5cxGX3Xk6SgbC0IdoDL1iP50qxkR8sp1rWMxv4q iKo1bl80cM9LT/GukZoRlN+IK8DqYkMxxpEslqUGwBdC+gB06ZhC8IHq0vwYFoSjizZn fCKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=JuHR3UWCCeq452V9BHavJMn59/50F/mGgP61pi3yT34=; b=JPdkvvEwemi+CVrAiPcsUiKzNXFGVrr6KanFnYIEnV+SFJ2FfTVWDGWuOksOmHU4Mm RbVj43RI9oFFyunBtHMXH7mXW/YfIFgHuCXcHenHqAcGSXd6bi2kR3Cewbp2kc/hCWvr NxSencplmLArWg48goTB8Xn3j3KRQvECMh1ksFskjYl9tX1Z6hs/lCc0M5GgUqoOSajV 9kFnvtuwmJ8zyRdF8Zlsw9eOWpdmXMzet/9er/T6f4YEHL3eH9yphzxX1CR75gLuY6Tw Y/hpJpC4dw3Sf7u+sULZ8BkfBKBzqymsNM3M0XSiqnSLZokeu/RxwLUgipILmQTdFRg0 u+XA== X-Gm-Message-State: AOAM531qeQB/E7CK8p93DzXbbFDzcmEShGZYZ7cDkStbnjA+pS0URD/p Lpw4DfXb7JlldmGL9F2DdtA= X-Google-Smtp-Source: ABdhPJwPd5pH/anX6bdK5kfoTJJI3XsIWTyaHLT/ew888fUZH+Y1kAz2elvCu9cNj1jqchs1HQaInA== X-Received: by 2002:a17:906:4705:: with SMTP id y5mr3567123ejq.112.1609955376083; Wed, 06 Jan 2021 09:49: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 n20sm1528388ejo.83.2021.01.06.09.49.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 09:49:35 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v3 0/3] PCI: Disable parity checking if broken_parity is set To: Bjorn Helgaas , Russell King - ARM Linux , Realtek linux nic maintainers , David Miller , Jakub Kicinski Message-ID: <992c800e-2e12-16b0-4845-6311b295d932@gmail.com> Date: Wed, 6 Jan 2021 18:49:32 +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 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_124938_032367_810B622F X-CRM114-Status: GOOD ( 13.53 ) 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. v2: - reduce scope of N2100 change to using the new PCI core quirk v3: - improve commit message of patch 2 Heiner Kallweit (3): PCI: Disable parity checking if broken_parity_status is set ARM: iop32x: improve N2100 PCI broken parity quirk r8169: simplify broken parity handling now that PCI core takes care arch/arm/mach-iop32x/n2100.c | 2 +- drivers/net/ethernet/realtek/r8169_main.c | 14 -------------- drivers/pci/quirks.c | 17 +++++++++++------ include/linux/pci.h | 2 ++ 4 files changed, 14 insertions(+), 21 deletions(-)