Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'pci-v6.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

- Enable device-specific ACS-like functionality even if the device
doesn't advertise an ACS capability, which got broken when adding
fancy ACS kernel parameter (Jason Gunthorpe)

* tag 'pci-v6.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
PCI: Fix pci_enable_acs() support for the ACS quirks

+9 -5
+9 -5
drivers/pci/pci.c
··· 1067 1067 static void pci_enable_acs(struct pci_dev *dev) 1068 1068 { 1069 1069 struct pci_acs caps; 1070 + bool enable_acs = false; 1070 1071 int pos; 1072 + 1073 + /* If an iommu is present we start with kernel default caps */ 1074 + if (pci_acs_enable) { 1075 + if (pci_dev_specific_enable_acs(dev)) 1076 + enable_acs = true; 1077 + } 1071 1078 1072 1079 pos = dev->acs_cap; 1073 1080 if (!pos) ··· 1084 1077 pci_read_config_word(dev, pos + PCI_ACS_CTRL, &caps.ctrl); 1085 1078 caps.fw_ctrl = caps.ctrl; 1086 1079 1087 - /* If an iommu is present we start with kernel default caps */ 1088 - if (pci_acs_enable) { 1089 - if (pci_dev_specific_enable_acs(dev)) 1090 - pci_std_enable_acs(dev, &caps); 1091 - } 1080 + if (enable_acs) 1081 + pci_std_enable_acs(dev, &caps); 1092 1082 1093 1083 /* 1094 1084 * Always apply caps from the command line, even if there is no iommu.