]> git.ipfire.org Git - thirdparty/linux.git/commit
power: sequencing: pcie-m2: Create serdev for PCI devices present before probe
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Tue, 19 May 2026 08:55:59 +0000 (14:25 +0530)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 8 Jun 2026 07:47:56 +0000 (09:47 +0200)
commitc4be520907a42981fd32736b6eec18aaaee738c8
tree62e6769e248fd04e507e40c66a98865e66e3aa88
parent8ababf888685c3167f49c77bcfae6f82bf661be6
power: sequencing: pcie-m2: Create serdev for PCI devices present before probe

So far, the driver is registering a notifier to create serdev for the PCI
devices that are going to be attached after probe. But it doesn't handle
the devices present before probe. Due to this, serdev is not getting
created for those existing devices.

Hence, create serdev for PCI devices available before probe as well.

Note that the serdev for available devices are created before
registering the notifier. There is a small window where a device could
appear after pwrseq_pcie_m2_create_serdev(), before notifier registration.
But since M.2 cards are fixed to a slot, they are mostly added either
before booting the host or after using hotplug. So this window is mostly
theoretical.

Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260519-pwrseq-m2-bt-v3-4-b39dc2ae3966@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/power/sequencing/pwrseq-pcie-m2.c