* [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
@ 2026-10-21 10:54 Slark Xiao
2026-10-21 12:51 ` Loic Poulain
2026-10-28 21:32 ` Jeff Hugo
0 siblings, 2 replies; 3+ messages in thread
From: Slark Xiao @ 2026-10-21 10:54 UTC (permalink / raw)
To: mani, jeff.hugo, krishna.chundru
Cc: loic.poulain, val, mhi, linux-arm-msm, linux-kernel, stable, Slark Xiao
For some MHI devices in some specific scenarios, the default value
of autosuspend_delay_ms may not be enough to handle the last wake
event, potentially leading to device timeout or link drop issues.
This can lead to a runtime resume failure and a subsequent system
error:
[ 8749.089545] mhi mhi0: Resuming from non M3 state (SYS ERROR)
[ 8749.089573] mhi-pci-generic 0000:73:00.0: failed to resume device: -22
[ 8749.090218] mhi-pci-generic 0000:73:00.0: device recovery started
...
[ 8752.940324] mhi-pci-generic 0000:73:00.0: reset failed
Following Qualcomm's recommended settings from Windows and their
suggestion during case discussions, update the default autosuspend
delay to 5000ms for MHI devices.
Fixes: d3800c1dce24 ("bus: mhi: pci_generic: Add support for runtime PM")
Cc: stable@vger.kernel.org
Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
v3: update the commit message and the comment of the define
v2: define a autosuspend delay timeout and explain the reason
---
drivers/bus/mhi/host/pci_generic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 7193a384cca4..17d51964b55f 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -21,6 +21,9 @@
#define MHI_POST_RESET_DELAY_MS 2000
+/* Timeout to accommodate a potential 'late wake-event' issue */
+#define MHI_AUTOSUSPEND_DELAY_MS 5000
+
#define HEALTH_CHECK_PERIOD (HZ * 2)
/* PCI VID definitions */
@@ -1483,7 +1486,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
/* Allow runtime suspend only if both PME from D3Hot and M3 are supported */
if (pci_pme_capable(pdev, PCI_D3hot) && !(info->no_m3)) {
- pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, MHI_AUTOSUSPEND_DELAY_MS);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
2026-10-21 10:54 [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao
@ 2026-10-21 12:51 ` Loic Poulain
2026-10-28 21:32 ` Jeff Hugo
1 sibling, 0 replies; 3+ messages in thread
From: Loic Poulain @ 2026-10-21 12:51 UTC (permalink / raw)
To: Slark Xiao
Cc: mani, jeff.hugo, krishna.chundru, val, mhi, linux-arm-msm,
linux-kernel, stable
On Wed, Oct 21, 2026 at 12:55 PM Slark Xiao <slark_xiao@163.com> wrote:
>
> For some MHI devices in some specific scenarios, the default value
> of autosuspend_delay_ms may not be enough to handle the last wake
> event, potentially leading to device timeout or link drop issues.
> This can lead to a runtime resume failure and a subsequent system
> error:
>
> [ 8749.089545] mhi mhi0: Resuming from non M3 state (SYS ERROR)
> [ 8749.089573] mhi-pci-generic 0000:73:00.0: failed to resume device: -22
> [ 8749.090218] mhi-pci-generic 0000:73:00.0: device recovery started
> ...
> [ 8752.940324] mhi-pci-generic 0000:73:00.0: reset failed
>
> Following Qualcomm's recommended settings from Windows and their
> suggestion during case discussions, update the default autosuspend
> delay to 5000ms for MHI devices.
>
> Fixes: d3800c1dce24 ("bus: mhi: pci_generic: Add support for runtime PM")
> Cc: stable@vger.kernel.org
> Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> v3: update the commit message and the comment of the define
> v2: define a autosuspend delay timeout and explain the reason
> ---
> drivers/bus/mhi/host/pci_generic.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 7193a384cca4..17d51964b55f 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -21,6 +21,9 @@
>
> #define MHI_POST_RESET_DELAY_MS 2000
>
> +/* Timeout to accommodate a potential 'late wake-event' issue */
> +#define MHI_AUTOSUSPEND_DELAY_MS 5000
> +
> #define HEALTH_CHECK_PERIOD (HZ * 2)
>
> /* PCI VID definitions */
> @@ -1483,7 +1486,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>
> /* Allow runtime suspend only if both PME from D3Hot and M3 are supported */
> if (pci_pme_capable(pdev, PCI_D3hot) && !(info->no_m3)) {
> - pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
> + pm_runtime_set_autosuspend_delay(&pdev->dev, MHI_AUTOSUSPEND_DELAY_MS);
> pm_runtime_use_autosuspend(&pdev->dev);
> pm_runtime_mark_last_busy(&pdev->dev);
> pm_runtime_put_noidle(&pdev->dev);
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
2026-10-21 10:54 [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao
2026-10-21 12:51 ` Loic Poulain
@ 2026-10-28 21:32 ` Jeff Hugo
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Hugo @ 2026-10-28 21:32 UTC (permalink / raw)
To: Slark Xiao, mani, krishna.chundru
Cc: loic.poulain, val, mhi, linux-arm-msm, linux-kernel, stable
On 10/21/2026 4:54 AM, Slark Xiao wrote:
> For some MHI devices in some specific scenarios, the default value
> of autosuspend_delay_ms may not be enough to handle the last wake
> event, potentially leading to device timeout or link drop issues.
> This can lead to a runtime resume failure and a subsequent system
> error:
>
> [ 8749.089545] mhi mhi0: Resuming from non M3 state (SYS ERROR)
> [ 8749.089573] mhi-pci-generic 0000:73:00.0: failed to resume device: -22
> [ 8749.090218] mhi-pci-generic 0000:73:00.0: device recovery started
> ...
> [ 8752.940324] mhi-pci-generic 0000:73:00.0: reset failed
>
> Following Qualcomm's recommended settings from Windows and their
> suggestion during case discussions, update the default autosuspend
> delay to 5000ms for MHI devices.
>
> Fixes: d3800c1dce24 ("bus: mhi: pci_generic: Add support for runtime PM")
> Cc: stable@vger.kernel.org
> Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-28 21:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 10:54 [PATCH v3] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao
2026-10-21 12:51 ` Loic Poulain
2026-10-28 21:32 ` Jeff Hugo
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®