summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2019-03-20 12:05:30 +0100
committerBjorn Helgaas <bhelgaas@google.com>2019-03-25 23:59:07 +0100
commit0fa635aec9abd718bd18c0bda2261351a0811efc (patch)
tree28feed152619c3557db954549f513abcb9bdc797 /drivers/pci/pcie
parentPCI/LINK: Clear bandwidth notification interrupt before enabling it (diff)
downloadlinux-0fa635aec9abd718bd18c0bda2261351a0811efc.tar.xz
linux-0fa635aec9abd718bd18c0bda2261351a0811efc.zip
PCI/LINK: Deduplicate bandwidth reports for multi-function devices
If a multi-function device's bandwidth is already limited when it is enumerated, a message is logged only for function 0. By contrast, when downtraining occurs after enumeration, a message is logged for all functions. That's because the former uses pcie_report_downtraining(), whereas the latter uses __pcie_print_link_status() (which doesn't filter functions != 0). I am seeing this happen on a MacBookPro9,1 with a GPU (function 0) and an integrated HDA controller (function 1). Avoid this incongruence by calling pcie_report_downtraining() in both cases. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alexandru Gagniuc <alex.gagniuc@dellteam.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/bw_notification.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/bw_notification.c b/drivers/pci/pcie/bw_notification.c
index 3c0f368c879b..4fa9e3523ee1 100644
--- a/drivers/pci/pcie/bw_notification.c
+++ b/drivers/pci/pcie/bw_notification.c
@@ -76,7 +76,7 @@ static irqreturn_t pcie_bw_notification_handler(int irq, void *context)
*/
down_read(&pci_bus_sem);
list_for_each_entry(dev, &port->subordinate->devices, bus_list)
- __pcie_print_link_status(dev, false);
+ pcie_report_downtraining(dev);
up_read(&pci_bus_sem);
return IRQ_HANDLED;