From mboxrd@z Thu Jan 1 00:00:00 1970 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.5 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,NICE_REPLY_A,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 68234C433DB for ; Wed, 6 Jan 2021 19:36:42 +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 1717223123 for ; Wed, 6 Jan 2021 19:36:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1717223123 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:Subject: From:References:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QiNYltnND/LliDS1sOp8EEmiq8neb/cJuqW3AFknt6g=; b=RbpOHBpUGhM3Jx8HiLFNkuboU 9Evn8ugMUNXP+n6DvSpsiB8rLfC2Omkh4XvaJTiYSM/mA5hox9ZPWwFsqasu97pq+M5yRcCDe3ZS4 62H4OtS0HPKC1tPsHaYECQCZ47q4V8/ZDlM4BV8+5xaFtn5Qnfcyyfn+T7KgouWmlxXRArI5Ezafy 1BPG259kp7kkWnuEz6Bjt/VmoQqX9x0stw1tHAtiqMOXRBc5Up9QxuyUy2J+VdLcCqIMw4En+ZF37 VMnm00o1MJGno61KIZzjr5GthdJrD4Sb57p3/miBYwORsuSALtS+ETLG9C9gqFjM56/tRtkA/NBS4 mwkGYSMmw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxEZk-0000X7-1p; Wed, 06 Jan 2021 19:34:32 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxEZh-0000WC-0X for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 19:34:29 +0000 Received: by mail-wr1-x431.google.com with SMTP id d26so3409906wrb.12 for ; Wed, 06 Jan 2021 11:34:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=j/tPa+TosF4s6ZeUcfX5xJrxDDEIBvCx2esSOFMWJPA=; b=kOhlrN3fzZP4EarkM5nObQu4al+WTx+UiL1xrbrx7/1xiNxyF+qDN+khSBv8s9icg0 fI/KhHZur15sGBNvSExuj2u2z3/6bZEkasKt+4UjSvXx7Bbh0BNzq/XdbM/72anjs4UL 84dhK2Gs7v4wN+iAfwISVQUihD0Q/ack4MPGiDs5QHLdvCxBXtzBx4Oyo9qi0xSV72TP RHHt27mef5qb6UXx8iTFhQotn8I5qaGtAliy4hGHm/OwStWBjZjxlc6qhcWSGw1TqjEY vluJJXPcdws9/QBOqDyjkKuZ568kvCCa6qlOuSigDEgvZ7L0NQntrA0XbPdOHqKjHBTu iStw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=j/tPa+TosF4s6ZeUcfX5xJrxDDEIBvCx2esSOFMWJPA=; b=JG9aMSgkhWcwmuYXj0iZK+ys5eeDKk30mXuQgMlxTXBv7lFR29y/ibtDpNNfkLgftI kggjxyed79qDv7akq6xd1RG+XmFRiVE6hSTMs4RaUXs5phROhe39fkxnz2RDip1FSW5+ TrIeE7L/FotmUmhokzXbGcCIivHKpHDLNvtlV2yxdLxH6l96ZLMlpnzSyh20LOioFoGY rjh4wk6N7s0XnMMElVxGf1JUhsKvdsr0Rxnz8eEnUqs8irC3jQBi12tyrZozgn9UlGcf joU0ucDVUsNbV+/nPV1aWmQH72A67mTi8XmI1Wtp/nI9zh7aZxpGEEkIGNpT4aZ4Wasf UhHQ== X-Gm-Message-State: AOAM532HzsMsdxxisqJFWrWRcCxak0DgHXxNsV2gPNNGCiPGFfae2fis Ec39zmu4tEoSFLAFw8vOX+g= X-Google-Smtp-Source: ABdhPJyAzCNiTuU1Yx4cF42lFYMKljtIPeDqI2NtDSj1UO4tBbTJIw9rIm8uvHroLFRpnaBN4vFOfg== X-Received: by 2002:a5d:610d:: with SMTP id v13mr5696020wrt.425.1609961667725; Wed, 06 Jan 2021 11:34:27 -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 125sm4359403wmc.27.2021.01.06.11.34.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 11:34:27 -0800 (PST) To: Bjorn Helgaas , Lennert Buytenhek , Russell King - ARM Linux References: <20210106192233.GA1329080@bjorn-Precision-5520> From: Heiner Kallweit Subject: Re: [PATCH v3 1/3] PCI: Disable parity checking if broken_parity is set Message-ID: <768d90a3-93ea-1f4e-f4e0-e039933bc17b@gmail.com> Date: Wed, 6 Jan 2021 20:34:23 +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: <20210106192233.GA1329080@bjorn-Precision-5520> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_143429_087428_4EA97DEA X-CRM114-Status: GOOD ( 21.67 ) 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: Realtek linux nic maintainers , "linux-pci@vger.kernel.org" , "netdev@vger.kernel.org" , Bjorn Helgaas , Jakub Kicinski , David Miller , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 06.01.2021 20:22, Bjorn Helgaas wrote: > On Wed, Jan 06, 2021 at 06:50:22PM +0100, Heiner Kallweit wrote: >> 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 > > This series should all go together. Let me know if you want me to do > anything more (would require acks for arm and r8169, of course). > Right. For r8169 I'm the maintainer myself and agreed with Jakub that the r8169 patch will go through the PCI tree. Regarding the arm/iop32x part: MAINTAINERS file lists Lennert as maintainer, let me add him. Strange thing is that the MAINTAINERS entry for arm/iop32x has no F entry, therefore the get_maintainers scripts will never list him as addressee. The script lists Russell as "odd fixer". @Lennert: Please provide a patch to add the missing F entry. ARM/INTEL IOP32X ARM ARCHITECTURE M: Lennert Buytenhek L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained >> --- >> 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) \ >> -- >> 2.30.0 >> >> >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel