Skip to contentSkip to conversation

PCI: Do not attempt to set ExtTag for VFs

PATCH Superseded Håkon Bugge 2 participants 2 messages Nov 11, 2025 PCI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Do not attempt to set ExtTag for VFs

The bit for enabling extended tags is Reserved and Preserved (RsvdP) for VFs. 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")
---
 drivers/pci/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/probe.c +2 -1
index 0ce98e18b5a87..014017e15bcc8 100644
@@ -2244,7 +2244,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);
Signature · 1 line
2.43.5
#1 lore raw
Quoted 2 lines · Håkon Bugge

The bit for enabling extended tags is Reserved and Preserved (RsvdP) for VFs.

Please add a PCIe spec reference.

Quoted 30 lines

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")
---
 drivers/pci/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/probe.c +2 -1
index 0ce98e18b5a87..014017e15bcc8 100644
@@ -2244,7 +2244,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);
Signature · 1 line
 i.