[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210203183019.7c9a5004@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 3 Feb 2021 18:30:19 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Raju Rangoju <rajur@...lsio.com>,
David Miller <davem@...emloft.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 1/4] PCI/VPD: Remove Chelsio T3 quirk
On Tue, 2 Feb 2021 21:35:55 +0100 Heiner Kallweit wrote:
> cxgb3 driver doesn't use the PCI core code for VPD access, it has its own
> implementation. Therefore we don't need a quirk for it in the core code.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
Would this not affect the size of the file under sysfs?
> diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> index 7915d10f9..db86fe226 100644
> --- a/drivers/pci/vpd.c
> +++ b/drivers/pci/vpd.c
> @@ -628,22 +628,17 @@ static void quirk_chelsio_extend_vpd(struct pci_dev *dev)
> {
> int chip = (dev->device & 0xf000) >> 12;
> int func = (dev->device & 0x0f00) >> 8;
> - int prod = (dev->device & 0x00ff) >> 0;
>
> /*
> - * If this is a T3-based adapter, there's a 1KB VPD area at offset
> - * 0xc00 which contains the preferred VPD values. If this is a T4 or
> - * later based adapter, the special VPD is at offset 0x400 for the
> - * Physical Functions (the SR-IOV Virtual Functions have no VPD
> - * Capabilities). The PCI VPD Access core routines will normally
> + * If this is a T4 or later based adapter, the special VPD is at offset
> + * 0x400 for the Physical Functions (the SR-IOV Virtual Functions have
> + * no VPD Capabilities). The PCI VPD Access core routines will normally
> * compute the size of the VPD by parsing the VPD Data Structure at
> * offset 0x000. This will result in silent failures when attempting
> * to accesses these other VPD areas which are beyond those computed
> * limits.
> */
> - if (chip == 0x0 && prod >= 0x20)
> - pci_set_vpd_size(dev, 8192);
> - else if (chip >= 0x4 && func < 0x8)
> + if (chip >= 0x4 && func < 0x8)
> pci_set_vpd_size(dev, 2048);
> }
>
Powered by blists - more mailing lists