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=-14.3 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 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 8BDC7C433E0 for ; Wed, 6 Jan 2021 00:30: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 450FB22CE3 for ; Wed, 6 Jan 2021 00:30:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 450FB22CE3 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=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:Message-ID:Subject:To:From: Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=NgmZ7A5n4nMEUr/nOuxeqvIoVMce5uoq5KtvSdl1PUQ=; b=Up0J5QzMPTPG6fxDwqH5AFjel SFNIdwAKwj0MkfRG4SQTSHDdTBRtwTPKbivhFxnVuA7YawfEFg5Cfu/5iYt5FSqCrH+EcHUsw6FEx FB/MmgXsnfAUU3I3syxGlucQ1ihF27H5I4c53m9F6lE2LfB6xHN8u/axvxJyMv0xxUePstgB2cdxK 2AQz6vPduR6YEajVssHkYCJzkj+cmKXKvpGc6vIIyMj3m3gEpbwmr/wmzJVOHncnuEfV9YM2aqDGv pUGlPR5y6D2qgzMJ5O0k8HIbBq7zKZFHk2/YxeNES139SoWmeiBJ9IhU6Xsr+j4oAegB0HNPxO/fC lItu7DU8g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwwgp-0004ow-37; Wed, 06 Jan 2021 00:28:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwwgn-0004oX-BN for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 00:28:38 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE04022CE3; Wed, 6 Jan 2021 00:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609892915; bh=V/ESplGs+J5p3tCKo1dio8HrjKM5HOXa0Nj+i1IkqtA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Y3ttC/6dDKAwlv2MCKl6J9dK2KAZDv5afed69j8x/3CtPCz7CIgWqXtuJsMMWnuLX S52GW0H1GvcXeajYX+FhGsw0RL2S/3V2UmZGMj97T3S/vs6iZX6RiciASaykiaoG0Z T+BXgAq3LJjAESz7l1rRoBD0ru2qLEFU5OphXfrKj50BeMF9C1nRe+JebNV5ccjDVw E5YnZNbf/g5xLnCxg7r8POe8MmnIdhXURY80DrrIOETXqgAOOaD0qqQI++G2wO1had CNQ9T2rYvArwJFvQzkPEDZSrOx3BuUDEhaAHhrSPaBNLglzH+HLqLtQmK7Ma24RMWn PzguiKsYZpqFQ== Date: Tue, 5 Jan 2021 18:28:33 -0600 From: Bjorn Helgaas To: Heiner Kallweit Subject: Re: [PATCH 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk Message-ID: <20210106002833.GA1286114@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_192837_456660_DCC282A2 X-CRM114-Status: GOOD ( 22.81 ) 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" , Russell King - ARM Linux , "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 Tue, Jan 05, 2021 at 10:42:31AM +0100, Heiner Kallweit wrote: > Simplify the quirk by using new PCI core function > pci_quirk_broken_parity(). In addition make the quirk > more specific, use device id 0x8169 instead of PCI_ANY_ID. > > Signed-off-by: Heiner Kallweit > --- > arch/arm/mach-iop32x/n2100.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c > index 78b9a5ee4..24c3eec46 100644 > --- a/arch/arm/mach-iop32x/n2100.c > +++ b/arch/arm/mach-iop32x/n2100.c > @@ -122,12 +122,10 @@ static struct hw_pci n2100_pci __initdata = { > */ > 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; > + if (machine_is_n2100()) > + pci_quirk_broken_parity(dev); Whatever "machine_is_n2100()" is (I can't find the definition), it is surely not equivalent to "00:01.0 || 00:02.0". That change probably should be a separate patch with some explanation. If this makes the quirk safe to use in a generic kernel, that sounds like a good thing. I guess a parity problem could be the result of a defect in either the device (e.g., 0x8169), which would be an issue in *all* platforms, or a platform-specific issue in the way it's wired up. I assume it's the latter because the quirk is not in drivers/pci/quirks.c. Why is it safe to restrict this to device ID 0x8169? If this is platform issue, it might affect any device in the slot. > } > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169); > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, 0x8169, n2100_fixup_r8169); > > static int __init n2100_pci_init(void) > { > -- > 2.30.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel