* [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup
@ 2026-03-03 9:02 Qiang Yu
2026-03-03 9:02 ` [PATCH v2 1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays Qiang Yu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Qiang Yu @ 2026-03-03 9:02 UTC (permalink / raw)
To: Manivannan Sadhasivam, Qiang Yu, Hemant Kumar, Bhaumik Bhatt,
Loic Poulain
Cc: mhi, linux-arm-msm, linux-kernel, Qiang Yu, stable
This series addresses boot performance issues with MHI PCI generic driver
and adds proper cleanup in the remove path.
Some modems like SDX75 take up to 20 seconds to initialize, which blocks
system boot while waiting for them to reach mission mode. The first patch
switches to async power up so the driver can return immediately and let
initialization happen in the background.
The second patch adds the missing pm_runtime_forbid() call in remove to
balance the pm_runtime_allow() from probe.
Changes in v2:
- Make a separated patch for pm_runtime_forbid in remove callback.
- Link to v1: https://lore.kernel.org/r/20260122-mhi_async_probe-v1-1-b5cb2a3629d0@oss.qualcomm.com
Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
Qiang Yu (2):
bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays
bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback
drivers/bus/mhi/host/pci_generic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 6a7084102bb9659f699005c420eb59eade6d3b4f
change-id: 20260303-b4-async_power_on-9191ce9e8e2e
Best regards,
--
Qiang Yu <qiang.yu@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays
2026-03-03 9:02 [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Qiang Yu
@ 2026-03-03 9:02 ` Qiang Yu
2026-03-03 9:02 ` [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback Qiang Yu
2026-03-06 7:41 ` [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Qiang Yu @ 2026-03-03 9:02 UTC (permalink / raw)
To: Manivannan Sadhasivam, Qiang Yu, Hemant Kumar, Bhaumik Bhatt,
Loic Poulain
Cc: mhi, linux-arm-msm, linux-kernel, Qiang Yu, stable
Some modem devices can take significant time (up to 20 secs for sdx75) to
enter mission mode during initialization. Currently, mhi_sync_power_up()
waits for this entire process to complete, blocking other driver probes
and delaying system boot.
Switch to mhi_async_power_up() so probe can return immediately while MHI
initialization continues in the background. This eliminates lengthy boot
delays and allows other drivers to probe in parallel, improving overall
system boot performance.
Fixes: 5571519009d0 ("bus: mhi: host: pci_generic: Add SDX75 based modem support")
Cc: stable@vger.kernel.org
Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
drivers/bus/mhi/host/pci_generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 425362037830ea9ef30acab748b07f04e47f3d90..0395a8ea52b0e874209ca56cd20ed04419038cdb 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -1405,7 +1405,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto err_unregister;
}
- err = mhi_sync_power_up(mhi_cntrl);
+ err = mhi_async_power_up(mhi_cntrl);
if (err) {
dev_err(&pdev->dev, "failed to power up MHI controller\n");
goto err_unprepare;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback
2026-03-03 9:02 [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Qiang Yu
2026-03-03 9:02 ` [PATCH v2 1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays Qiang Yu
@ 2026-03-03 9:02 ` Qiang Yu
2026-03-06 7:42 ` Manivannan Sadhasivam
2026-03-06 7:41 ` [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Manivannan Sadhasivam
2 siblings, 1 reply; 5+ messages in thread
From: Qiang Yu @ 2026-03-03 9:02 UTC (permalink / raw)
To: Manivannan Sadhasivam, Qiang Yu, Hemant Kumar, Bhaumik Bhatt,
Loic Poulain
Cc: mhi, linux-arm-msm, linux-kernel, Qiang Yu
Add pm_runtime_forbid() to balance the pm_runtime_allow() call made
during probe. Without this, the device remains in runtime PM allowed
state after driver removal.
Fixes: 855a70c12021 ("bus: mhi: Add MHI PCI support for WWAN modems")
Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
drivers/bus/mhi/host/pci_generic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 0395a8ea52b0e874209ca56cd20ed04419038cdb..b6b21d0f3388d61b771062b8077f836a6bf8f9f8 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -1459,6 +1459,7 @@ static void mhi_pci_remove(struct pci_dev *pdev)
mhi_soc_reset(mhi_cntrl);
mhi_unregister_controller(mhi_cntrl);
+ pm_runtime_forbid(&pdev->dev);
}
static void mhi_pci_shutdown(struct pci_dev *pdev)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback
2026-03-03 9:02 ` [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback Qiang Yu
@ 2026-03-06 7:42 ` Manivannan Sadhasivam
0 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-06 7:42 UTC (permalink / raw)
To: Qiang Yu
Cc: Qiang Yu, Hemant Kumar, Bhaumik Bhatt, Loic Poulain, mhi,
linux-arm-msm, linux-kernel
On Tue, Mar 03, 2026 at 01:02:14AM -0800, Qiang Yu wrote:
> Add pm_runtime_forbid() to balance the pm_runtime_allow() call made
> during probe. Without this, the device remains in runtime PM allowed
> state after driver removal.
>
> Fixes: 855a70c12021 ("bus: mhi: Add MHI PCI support for WWAN modems")
> Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> ---
> drivers/bus/mhi/host/pci_generic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 0395a8ea52b0e874209ca56cd20ed04419038cdb..b6b21d0f3388d61b771062b8077f836a6bf8f9f8 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -1459,6 +1459,7 @@ static void mhi_pci_remove(struct pci_dev *pdev)
> mhi_soc_reset(mhi_cntrl);
>
> mhi_unregister_controller(mhi_cntrl);
> + pm_runtime_forbid(&pdev->dev);
I moved this to the start of mhi_pci_remove() while applying.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup
2026-03-03 9:02 [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Qiang Yu
2026-03-03 9:02 ` [PATCH v2 1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays Qiang Yu
2026-03-03 9:02 ` [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback Qiang Yu
@ 2026-03-06 7:41 ` Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2026-03-06 7:41 UTC (permalink / raw)
To: Manivannan Sadhasivam, Qiang Yu, Hemant Kumar, Bhaumik Bhatt,
Loic Poulain, Qiang Yu
Cc: mhi, linux-arm-msm, linux-kernel, stable
On Tue, 03 Mar 2026 01:02:12 -0800, Qiang Yu wrote:
> This series addresses boot performance issues with MHI PCI generic driver
> and adds proper cleanup in the remove path.
>
> Some modems like SDX75 take up to 20 seconds to initialize, which blocks
> system boot while waiting for them to reach mission mode. The first patch
> switches to async power up so the driver can return immediately and let
> initialization happen in the background.
>
> [...]
Applied, thanks!
[1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays
commit: cfdb41adf1c2822ad1b1791d4d11093edb5582b6
[2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback
commit: f227b246307e0cf3091e13e7fbae3974aaf38eb9
Best regards,
--
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-06 7:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 9:02 [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Qiang Yu
2026-03-03 9:02 ` [PATCH v2 1/2] bus: mhi: host: pci_generic: Switch to async power up to avoid boot delays Qiang Yu
2026-03-03 9:02 ` [PATCH v2 2/2] bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback Qiang Yu
2026-03-06 7:42 ` Manivannan Sadhasivam
2026-03-06 7:41 ` [PATCH v2 0/2] bus: mhi: host: pci_generic: Improve boot performance and cleanup Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®