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

Merge branch 'pci/portdrv'

- Enable Bandwidth Notification only if port supports it (Stuart Hayes)

* pci/portdrv:
PCI/portdrv: Enable Bandwidth Notification only if port supports it

+7 -2
+7 -2
drivers/pci/pcie/portdrv_core.c
··· 257 257 services |= PCIE_PORT_SERVICE_DPC; 258 258 259 259 if (pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM || 260 - pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) 261 - services |= PCIE_PORT_SERVICE_BWNOTIF; 260 + pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) { 261 + u32 linkcap; 262 + 263 + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &linkcap); 264 + if (linkcap & PCI_EXP_LNKCAP_LBNC) 265 + services |= PCIE_PORT_SERVICE_BWNOTIF; 266 + } 262 267 263 268 return services; 264 269 }