Skip to content
Commit 8f62819a authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Bjorn Helgaas
Browse files

PCI/pwrctl: Rescan bus on a separate thread

If we trigger the bus rescan from sysfs, we'll try to lock the PCI rescan
mutex recursively and deadlock - the platform device will be populated and
probed on the same thread that handles the sysfs write.

Add a workqueue to the pwrctl code on which we schedule the rescan for
controlled PCI devices. While at it: add a new interface for initializing
the pwrctl context where we'd now assign the parent device address and
initialize the workqueue.

Link: https://lore.kernel.org/r/20240823093323.33450-3-brgl@bgdev.pl


Fixes: 4565d265 ("PCI/pwrctl: Add PCI power control core code")
Reported-by: default avatarKonrad Dybcio <konradybcio@kernel.org>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent f1536585
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment