From: Qiang Ma <maqianga@uniontech.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Qiang Ma <maqianga@uniontech.com>
Subject: [PATCH] PCI/VPD: Disable VPD for Lenovo Realtek RTL8111xP devices
Date: Thu, 21 May 2026 17:41:38 +0800 [thread overview]
Message-ID: <20260521094138.1634411-1-maqianga@uniontech.com> (raw)
The Lenovo 17aa:507e RTL8111xP multi-function device exposes a VPD
capability on all functions, but the VPD storage is not usable.
Function 0 returns an invalid first tag and functions 1-4 never complete
VPD transactions.
This produces noisy dmesg output when userspace reads the VPD sysfs
attribute, including:
[ 16.654155] r8169 0000:02:00.0: invalid VPD tag 0x00 (size 0) at offset 0; assume missing optional EEPROM
[ 16.790913] serial 0000:02:00.1: VPD access failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update
[ 16.931963] serial 0000:02:00.2: VPD access failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update
[ 17.071445] pci 0000:02:00.3: VPD access failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update
[ 17.210910] ehci-pci 0000:02:00.4: VPD access failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update
VPD is optional. Disable VPD for this exact subsystem and revision so the
PCI core does not expose a broken VPD sysfs file that cannot be read.
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
---
drivers/pci/vpd.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
index 153394a652d3..492e0d669ea8 100644
--- a/drivers/pci/vpd.c
+++ b/drivers/pci/vpd.c
@@ -597,6 +597,32 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATTANSIC, PCI_ANY_ID, quirk_blacklist_vpd
DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031,
PCI_CLASS_BRIDGE_PCI, 8, quirk_blacklist_vpd);
+/*
+ * The Lenovo 17aa:507e RTL8111xP multi-function device advertises VPD
+ * on all functions, but the VPD data is not usable. Function 0 returns
+ * an invalid first tag and functions 1-4 never complete VPD accesses.
+ */
+static void quirk_lenovo_realtek_rtl8111xp_no_vpd(struct pci_dev *dev)
+{
+ if (dev->revision != 0x0e ||
+ dev->subsystem_vendor != PCI_VENDOR_ID_LENOVO ||
+ dev->subsystem_device != 0x507e)
+ return;
+
+ dev->vpd.len = PCI_VPD_SZ_INVALID;
+ pci_warn(dev, FW_BUG "disabling VPD access (can't determine size of non-standard VPD format)\n");
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x8168,
+ quirk_lenovo_realtek_rtl8111xp_no_vpd);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x816a,
+ quirk_lenovo_realtek_rtl8111xp_no_vpd);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x816b,
+ quirk_lenovo_realtek_rtl8111xp_no_vpd);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x816c,
+ quirk_lenovo_realtek_rtl8111xp_no_vpd);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x816d,
+ quirk_lenovo_realtek_rtl8111xp_no_vpd);
+
static void quirk_chelsio_extend_vpd(struct pci_dev *dev)
{
int chip = (dev->device & 0xf000) >> 12;
--
2.20.1
next reply other threads:[~2026-05-21 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 9:41 Qiang Ma [this message]
2026-05-21 16:39 ` [PATCH] PCI/VPD: Disable VPD for Lenovo Realtek RTL8111xP devices Bjorn Helgaas
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=20260521094138.1634411-1-maqianga@uniontech.com \
--to=maqianga@uniontech.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--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