summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHåkon Bugge <haakon.bugge@oracle.com>2025-11-12 10:54:40 +0100
committerSasha Levin <sashal@kernel.org>2026-03-04 07:19:39 -0500
commitcccd21de7dcd694d86ffb5a579566e28f0d18deb (patch)
tree6b6b2a3c055ec3960cce9591b7516301f4c33032
parentf9b2f54d1977a096da3961c0fe0a8e041e6d1991 (diff)
PCI: Do not attempt to set ExtTag for VFs
[ Upstream commit 73711730a1128d91ebca1a6994ceeb18f36cb0cd ] The bit for enabling extended tags is Reserved and Preserved (RsvdP) for VFs, according to PCIe r7.0 section 7.5.3.4 table 7.21. Hence, bail out early from pci_configure_extended_tags() if the device is a VF. Otherwise, we may see incorrect log messages such as: kernel: pci 0000:af:00.2: enabling Extended Tags (af:00.2 is a VF) Fixes: 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported") Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Link: https://patch.msgid.link/20251112095442.1913258-1-haakon.bugge@oracle.com Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/pci/probe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c37ff0ee53f8..4a72a0163a86 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2097,7 +2097,8 @@ int pci_configure_extended_tags(struct pci_dev *dev, void *ign)
u16 ctl;
int ret;
- if (!pci_is_pcie(dev))
+ /* PCI_EXP_DEVCTL_EXT_TAG is RsvdP in VFs */
+ if (!pci_is_pcie(dev) || dev->is_virtfn)
return 0;
ret = pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap);