]> www.infradead.org Git - users/dwmw2/linux.git/commit
PCI: Refactor pcie_update_link_speed()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 18 Oct 2024 14:47:50 +0000 (17:47 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 11 Nov 2024 20:20:04 +0000 (14:20 -0600)
commite93d9fcfd7dc643eb5fce43053774d27bea2b263
tree5fdf6b1b097a165b922fd3f4f81c1dab6e062043
parentd2bd39c0456b75be9dfc7d774b8d021355c26ae3
PCI: Refactor pcie_update_link_speed()

pcie_update_link_speed() is passed the Link Status register but not all
callers have that value at hand nor need the value.

Refactor pcie_update_link_speed() to include reading the Link Status
register and create __pcie_update_link_speed() which can be used by the
hotplug code that has the register value at hand beforehand (and needs the
value for other purposes).

Link: https://lore.kernel.org/r/20241018144755.7875-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/hotplug/pciehp_hpc.c
drivers/pci/pci.h
drivers/pci/probe.c