[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260122-mhi_async_probe-v1-1-b5cb2a3629d0@oss.qualcomm.com>
Date: Thu, 22 Jan 2026 00:53:48 -0800
From: Qiang Yu <qiang.yu@....qualcomm.com>
To: Manivannan Sadhasivam <mani@...nel.org>,
Qiang Yu <quic_qianyu@...cinc.com>
Cc: mhi@...ts.linux.dev, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Qiang Yu <qiang.yu@....qualcomm.com>
Subject: [PATCH] bus: mhi: host: pci_generic: Switch to async power up to
avoid boot delays
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.
Add pm_runtime_forbid() in remove path to prevent device suspend during
driver reinstallation. This issue is specific to async power up: with
sync power up, pm_runtime_put_noidle() is called after mission mode is
reached because mhi_sync_power_up() waits for mission mode event. With
async power up, pm_runtime_put_noidle() is called immediately while power
up process continues in background, which can cause the device to
suspend and mhi init fail if pm_runtime_allow() from a previous probe
is still active.
Fixes: 5571519009d0 ("bus: mhi: host: pci_generic: Add SDX75 based modem support")
Cc: stable@...r.kernel.org
Signed-off-by: Qiang Yu <qiang.yu@....qualcomm.com>
---
drivers/bus/mhi/host/pci_generic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 0884a384b77fc3f56fa62a12351933132ffc9293..fc0952e46ae5e4854c7165ed60b850729843d458 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -1393,7 +1393,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;
@@ -1447,6 +1447,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)
---
base-commit: 91a0b0dce350766675961892ba4431363c4e29f7
change-id: 20260113-mhi_async_probe-a7b0867b6e2e
Best regards,
--
Qiang Yu <qiang.yu@....qualcomm.com>
Powered by blists - more mailing lists