PCI: Hold the rescan mutex when scanning for the first time
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 12 Jun 2024 08:20:14 +0000 (10:20 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 12 Jun 2024 11:20:56 +0000 (13:20 +0200)
commit5799eba8eeabe79a476016f22a7aea57467b7638
tree7133e6311043bcc068915427fdf3fffae56a9118
parent2f1630f437dff20d02e4b3f07e836f42869128dd
PCI: Hold the rescan mutex when scanning for the first time

With the introduction of PCI device power control drivers that will be
able to trigger the port rescan when probing, we need to hold the rescan
mutex during the initial pci_host_probe() too or the two could get in
each other's way.

Tested-by: Amit Pundir <amit.pundir@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # OnePlus 8T
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240612082019.19161-2-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/pci/probe.c