Skip to content
/ linux Public

Commit cf7e6db

Browse files
Hakon-BuggeSasha Levin
authored andcommitted
PCI: Do not attempt to set ExtTag for VFs
[ Upstream commit 7371173 ] 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: 60db3a4 ("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>
1 parent a417643 commit cf7e6db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pci/probe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,8 @@ int pci_configure_extended_tags(struct pci_dev *dev, void *ign)
21012101
u16 ctl;
21022102
int ret;
21032103

2104-
if (!pci_is_pcie(dev))
2104+
/* PCI_EXP_DEVCTL_EXT_TAG is RsvdP in VFs */
2105+
if (!pci_is_pcie(dev) || dev->is_virtfn)
21052106
return 0;
21062107

21072108
ret = pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap);

0 commit comments

Comments
 (0)