From: Bjorn Helgaas <helgaas@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v2] PCI/VPD: Remove not any longer needed Broadcom NIC quirk
Date: Tue, 30 Mar 2021 16:52:45 -0500 [thread overview]
Message-ID: <20210330215245.GA1320594@bjorn-Precision-5520> (raw)
In-Reply-To: <daa6acdf-5027-62c8-e3fb-125411b018f5@gmail.com>
On Thu, Dec 17, 2020 at 09:59:03PM +0100, Heiner Kallweit wrote:
> This quirk was added in 2008 [0] when we didn't have the logic yet to
> determine VPD size based on checking for the VPD end tag. Now that we
> have this logic [1] and don't read beyond the end tag this quirk can
> be removed.
>
> [0] 99cb233d60cb ("PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.")
> [1] 104daa71b396 ("PCI: Determine actual VPD size on first access")
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied to pci/vpd for v5.13 with subject "PCI/VPD: Remove obsolete
Broadcom NIC quirk", thanks!
> ---
> This is basically the same as what you're currently discussing
> for the Marvell / QLogic 1077 quirk.
> ---
> drivers/pci/vpd.c | 46 ----------------------------------------------
> 1 file changed, 46 deletions(-)
>
> diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> index 7915d10f9..ef5165eb3 100644
> --- a/drivers/pci/vpd.c
> +++ b/drivers/pci/vpd.c
> @@ -578,52 +578,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_QLOGIC, 0x2261, quirk_blacklist_vpd);
> DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031,
> PCI_CLASS_BRIDGE_PCI, 8, quirk_blacklist_vpd);
>
> -/*
> - * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
> - * VPD end tag will hang the device. This problem was initially
> - * observed when a vpd entry was created in sysfs
> - * ('/sys/bus/pci/devices/<id>/vpd'). A read to this sysfs entry
> - * will dump 32k of data. Reading a full 32k will cause an access
> - * beyond the VPD end tag causing the device to hang. Once the device
> - * is hung, the bnx2 driver will not be able to reset the device.
> - * We believe that it is legal to read beyond the end tag and
> - * therefore the solution is to limit the read/write length.
> - */
> -static void quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
> -{
> - /*
> - * Only disable the VPD capability for 5706, 5706S, 5708,
> - * 5708S and 5709 rev. A
> - */
> - if ((dev->device == PCI_DEVICE_ID_NX2_5706) ||
> - (dev->device == PCI_DEVICE_ID_NX2_5706S) ||
> - (dev->device == PCI_DEVICE_ID_NX2_5708) ||
> - (dev->device == PCI_DEVICE_ID_NX2_5708S) ||
> - ((dev->device == PCI_DEVICE_ID_NX2_5709) &&
> - (dev->revision & 0xf0) == 0x0)) {
> - if (dev->vpd)
> - dev->vpd->len = 0x80;
> - }
> -}
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5706,
> - quirk_brcm_570x_limit_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5706S,
> - quirk_brcm_570x_limit_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5708,
> - quirk_brcm_570x_limit_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5708S,
> - quirk_brcm_570x_limit_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5709,
> - quirk_brcm_570x_limit_vpd);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
> - PCI_DEVICE_ID_NX2_5709S,
> - quirk_brcm_570x_limit_vpd);
> -
> static void quirk_chelsio_extend_vpd(struct pci_dev *dev)
> {
> int chip = (dev->device & 0xf000) >> 12;
> --
> 2.29.2
>
prev parent reply other threads:[~2021-03-30 21:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 20:59 [PATCH v2] PCI/VPD: Remove not any longer needed Broadcom NIC quirk Heiner Kallweit
2021-02-02 23:12 ` Bjorn Helgaas
2021-02-03 7:09 ` Heiner Kallweit
2021-03-30 21:52 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210330215245.GA1320594@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=hkallweit1@gmail.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).