* [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
@ 2026-10-19 5:51 Slark Xiao
2026-10-19 7:41 ` Loic Poulain
0 siblings, 1 reply; 6+ messages in thread
From: Slark Xiao @ 2026-10-19 5:51 UTC (permalink / raw)
To: mani, jeff.hugo, krishna.chundru
Cc: loic.poulain, mhi, linux-arm-msm, linux-kernel, stable, Slark Xiao
For some MHI devices in some specific scenario, the default value
of autosuspend_delay_ms may not enough to handle last wake event.
This may lead to some unexpected problems.
Refer to the Qualcomm's Windows settings and we checked this with
Quaclomm over case, Qualcomm recommend us to set this as 5000ms.
Qualcomm also suggests us to update this for all MHI devices.
Since this setting has affected some existed kernel versions, it's
better to be applied to stable version.
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>
---
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 7193a384cca4..40735beb46cb 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -1483,7 +1483,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, 5000);
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] 6+ messages in thread* Re: [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms 2026-10-19 5:51 [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao @ 2026-10-19 7:41 ` Loic Poulain 2026-10-20 3:20 ` Slark Xiao 0 siblings, 1 reply; 6+ messages in thread From: Loic Poulain @ 2026-10-19 7:41 UTC (permalink / raw) To: Slark Xiao Cc: mani, jeff.hugo, krishna.chundru, mhi, linux-arm-msm, linux-kernel, stable On Mon, Oct 19, 2026 at 7:52 AM Slark Xiao <slark_xiao@163.com> wrote: > > For some MHI devices in some specific scenario, the default value > of autosuspend_delay_ms may not enough to handle last wake event. > This may lead to some unexpected problems. > > Refer to the Qualcomm's Windows settings and we checked this with > Quaclomm over case, Qualcomm recommend us to set this as 5000ms. Qualcomm > Qualcomm also suggests us to update this for all MHI devices. > Since this setting has affected some existed kernel versions, it's > better to be applied to stable version. This looks more like a workaround than a proper fix. It would be helpful to describe the underlying issue, including the timing and sequence of events that make this necessary. In principle, either the device can be suspended at that point or it cannot. Relying on a delayed suspend feels fragile and may end up masking the real problem. > > 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> > --- > 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 7193a384cca4..40735beb46cb 100644 > --- a/drivers/bus/mhi/host/pci_generic.c > +++ b/drivers/bus/mhi/host/pci_generic.c > @@ -1483,7 +1483,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, 5000); > 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] 6+ messages in thread
* Re:Re: [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms 2026-10-19 7:41 ` Loic Poulain @ 2026-10-20 3:20 ` Slark Xiao 2026-10-20 7:27 ` Loic Poulain 0 siblings, 1 reply; 6+ messages in thread From: Slark Xiao @ 2026-10-20 3:20 UTC (permalink / raw) To: Loic Poulain Cc: mani, jeff.hugo, krishna.chundru, mhi, linux-arm-msm, linux-kernel, stable At 2026-10-19 15:41:27, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: >On Mon, Oct 19, 2026 at 7:52 AM Slark Xiao <slark_xiao@163.com> wrote: >> >> For some MHI devices in some specific scenario, the default value >> of autosuspend_delay_ms may not enough to handle last wake event. >> This may lead to some unexpected problems. >> >> Refer to the Qualcomm's Windows settings and we checked this with >> Quaclomm over case, Qualcomm recommend us to set this as 5000ms. > >Qualcomm > >> Qualcomm also suggests us to update this for all MHI devices. >> Since this setting has affected some existed kernel versions, it's >> better to be applied to stable version. > >This looks more like a workaround than a proper fix. It would be >helpful to describe the underlying issue, including the timing and >sequence of events that make this necessary. In principle, either the >device can be suspended at that point or it cannot. Relying on a >delayed suspend feels fragile and may end up masking the real problem. > Hi Loic, Honestly, Qualcomm has been analyzing for over 2 months and still hasn't identified the root cause. Actually I have explained the reasons behind the events to Mani in another thread, you can refer to https://lore.kernel.org/mhi/20260919095506.9570-1-slark_xiao@163.com/ From Qualcomm's perspective, 2 seconds is not enough for their default design. They recommended us to update this value to 5 seconds and Mani checked this internally as well. So we decided to update this 5 seconds setting to all MHI devices. Thanks >> >> 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> >> --- >> 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 7193a384cca4..40735beb46cb 100644 >> --- a/drivers/bus/mhi/host/pci_generic.c >> +++ b/drivers/bus/mhi/host/pci_generic.c >> @@ -1483,7 +1483,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, 5000); >> 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] 6+ messages in thread
* Re: Re: [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms 2026-10-20 3:20 ` Slark Xiao @ 2026-10-20 7:27 ` Loic Poulain 2026-10-20 10:31 ` Slark Xiao 0 siblings, 1 reply; 6+ messages in thread From: Loic Poulain @ 2026-10-20 7:27 UTC (permalink / raw) To: Slark Xiao Cc: mani, jeff.hugo, krishna.chundru, mhi, linux-arm-msm, linux-kernel, stable Hi Slark, On Tue, Oct 20, 2026 at 5:20 AM Slark Xiao <slark_xiao@163.com> wrote: > > > At 2026-10-19 15:41:27, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: > >On Mon, Oct 19, 2026 at 7:52 AM Slark Xiao <slark_xiao@163.com> wrote: > >> > >> For some MHI devices in some specific scenario, the default value > >> of autosuspend_delay_ms may not enough to handle last wake event. > >> This may lead to some unexpected problems. > >> > >> Refer to the Qualcomm's Windows settings and we checked this with > >> Quaclomm over case, Qualcomm recommend us to set this as 5000ms. > > > >Qualcomm > > > >> Qualcomm also suggests us to update this for all MHI devices. > >> Since this setting has affected some existed kernel versions, it's > >> better to be applied to stable version. > > > >This looks more like a workaround than a proper fix. It would be > >helpful to describe the underlying issue, including the timing and > >sequence of events that make this necessary. In principle, either the > >device can be suspended at that point or it cannot. Relying on a > >delayed suspend feels fragile and may end up masking the real problem. > > > Hi Loic, > Honestly, Qualcomm has been analyzing for over 2 months and still hasn't > identified the root cause. > > Actually I have explained the reasons behind the events to Mani in another > thread, you can refer to https://lore.kernel.org/mhi/20260919095506.9570-1-slark_xiao@163.com/ > > From Qualcomm's perspective, 2 seconds is not enough for their default design. > They recommended us to update this value to 5 seconds and Mani checked this > internally as well. So we decided to update this 5 seconds setting to all MHI devices. Thanks. I'm really surprised we still don't have a more precise understanding or description of the underlying issue. That said, I think it's reasonable to proceed with this as an initial workaround. Could you please send a v2 that introduces a define for the 5000 ms timeout? It would also be helpful to add a comment explaining that this value is required to accommodate the 'late wake-event issue'. Regards, Loic > > Thanks > >> > >> 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> > >> --- > >> 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 7193a384cca4..40735beb46cb 100644 > >> --- a/drivers/bus/mhi/host/pci_generic.c > >> +++ b/drivers/bus/mhi/host/pci_generic.c > >> @@ -1483,7 +1483,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, 5000); > >> 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] 6+ messages in thread
* Re:Re: Re: [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms 2026-10-20 7:27 ` Loic Poulain @ 2026-10-20 10:31 ` Slark Xiao 2026-10-20 11:42 ` Loic Poulain 0 siblings, 1 reply; 6+ messages in thread From: Slark Xiao @ 2026-10-20 10:31 UTC (permalink / raw) To: Loic Poulain Cc: mani, jeff.hugo, krishna.chundru, mhi, linux-arm-msm, linux-kernel, stable At 2026-10-20 15:27:43, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: >Hi Slark, > >On Tue, Oct 20, 2026 at 5:20 AM Slark Xiao <slark_xiao@163.com> wrote: >> >> >> At 2026-10-19 15:41:27, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: >> >On Mon, Oct 19, 2026 at 7:52 AM Slark Xiao <slark_xiao@163.com> wrote: >> >> >> >> For some MHI devices in some specific scenario, the default value >> >> of autosuspend_delay_ms may not enough to handle last wake event. >> >> This may lead to some unexpected problems. >> >> >> >> Refer to the Qualcomm's Windows settings and we checked this with >> >> Quaclomm over case, Qualcomm recommend us to set this as 5000ms. >> > >> >Qualcomm >> > >> >> Qualcomm also suggests us to update this for all MHI devices. >> >> Since this setting has affected some existed kernel versions, it's >> >> better to be applied to stable version. >> > >> >This looks more like a workaround than a proper fix. It would be >> >helpful to describe the underlying issue, including the timing and >> >sequence of events that make this necessary. In principle, either the >> >device can be suspended at that point or it cannot. Relying on a >> >delayed suspend feels fragile and may end up masking the real problem. >> > >> Hi Loic, >> Honestly, Qualcomm has been analyzing for over 2 months and still hasn't >> identified the root cause. >> >> Actually I have explained the reasons behind the events to Mani in another >> thread, you can refer to https://lore.kernel.org/mhi/20260919095506.9570-1-slark_xiao@163.com/ >> >> From Qualcomm's perspective, 2 seconds is not enough for their default design. >> They recommended us to update this value to 5 seconds and Mani checked this >> internally as well. So we decided to update this 5 seconds setting to all MHI devices. > >Thanks. I'm really surprised we still don't have a more precise >understanding or description of the underlying issue. That said, I >think it's reasonable to proceed with this as an initial workaround. > >Could you please send a v2 that introduces a define for the 5000 ms >timeout? It would also be helpful to add a comment explaining that >this value is required to accommodate the 'late wake-event issue'. > >Regards, >Loic Do you mean something like below? /* Add define of initial autosuspend_delay_ms to accommodate a potential 'late wake-event' issue */ #define MHI_AUTOSUSPEND_DELAY_MS 5000 ...... - pm_runtime_set_autosuspend_delay(&pdev->dev, 2000); + pm_runtime_set_autosuspend_delay(&pdev->dev, MHI_AUTOSUSPEND_DELAY_MS); Thanks >> >> Thanks >> >> >> >> 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> >> >> --- >> >> 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 7193a384cca4..40735beb46cb 100644 >> >> --- a/drivers/bus/mhi/host/pci_generic.c >> >> +++ b/drivers/bus/mhi/host/pci_generic.c >> >> @@ -1483,7 +1483,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, 5000); >> >> 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] 6+ messages in thread
* Re: Re: Re: [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms 2026-10-20 10:31 ` Slark Xiao @ 2026-10-20 11:42 ` Loic Poulain 0 siblings, 0 replies; 6+ messages in thread From: Loic Poulain @ 2026-10-20 11:42 UTC (permalink / raw) To: Slark Xiao Cc: mani, jeff.hugo, krishna.chundru, mhi, linux-arm-msm, linux-kernel, stable On Tue, Oct 20, 2026 at 12:31 PM Slark Xiao <slark_xiao@163.com> wrote: > > > > At 2026-10-20 15:27:43, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: > >Hi Slark, > > > >On Tue, Oct 20, 2026 at 5:20 AM Slark Xiao <slark_xiao@163.com> wrote: > >> > >> > >> At 2026-10-19 15:41:27, "Loic Poulain" <loic.poulain@oss.qualcomm.com> wrote: > >> >On Mon, Oct 19, 2026 at 7:52 AM Slark Xiao <slark_xiao@163.com> wrote: > >> >> > >> >> For some MHI devices in some specific scenario, the default value > >> >> of autosuspend_delay_ms may not enough to handle last wake event. > >> >> This may lead to some unexpected problems. > >> >> > >> >> Refer to the Qualcomm's Windows settings and we checked this with > >> >> Quaclomm over case, Qualcomm recommend us to set this as 5000ms. > >> > > >> >Qualcomm > >> > > >> >> Qualcomm also suggests us to update this for all MHI devices. > >> >> Since this setting has affected some existed kernel versions, it's > >> >> better to be applied to stable version. > >> > > >> >This looks more like a workaround than a proper fix. It would be > >> >helpful to describe the underlying issue, including the timing and > >> >sequence of events that make this necessary. In principle, either the > >> >device can be suspended at that point or it cannot. Relying on a > >> >delayed suspend feels fragile and may end up masking the real problem. > >> > > >> Hi Loic, > >> Honestly, Qualcomm has been analyzing for over 2 months and still hasn't > >> identified the root cause. > >> > >> Actually I have explained the reasons behind the events to Mani in another > >> thread, you can refer to https://lore.kernel.org/mhi/20260919095506.9570-1-slark_xiao@163.com/ > >> > >> From Qualcomm's perspective, 2 seconds is not enough for their default design. > >> They recommended us to update this value to 5 seconds and Mani checked this > >> internally as well. So we decided to update this 5 seconds setting to all MHI devices. > > > >Thanks. I'm really surprised we still don't have a more precise > >understanding or description of the underlying issue. That said, I > >think it's reasonable to proceed with this as an initial workaround. > > > >Could you please send a v2 that introduces a define for the 5000 ms > >timeout? It would also be helpful to add a comment explaining that > >this value is required to accommodate the 'late wake-event issue'. > > > >Regards, > >Loic > > Do you mean something like below? > > /* Add define of initial autosuspend_delay_ms to accommodate a potential 'late wake-event' issue */ > #define MHI_AUTOSUSPEND_DELAY_MS 5000 > ...... > - pm_runtime_set_autosuspend_delay(&pdev->dev, 2000); > + pm_runtime_set_autosuspend_delay(&pdev->dev, MHI_AUTOSUSPEND_DELAY_MS); Yes. > > Thanks > > >> > >> Thanks > >> >> > >> >> 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> > >> >> --- > >> >> 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 7193a384cca4..40735beb46cb 100644 > >> >> --- a/drivers/bus/mhi/host/pci_generic.c > >> >> +++ b/drivers/bus/mhi/host/pci_generic.c > >> >> @@ -1483,7 +1483,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, 5000); > >> >> 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] 6+ messages in thread
end of thread, other threads:[~2026-10-20 11:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-19 5:51 [PATCH] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao 2026-10-19 7:41 ` Loic Poulain 2026-10-20 3:20 ` Slark Xiao 2026-10-20 7:27 ` Loic Poulain 2026-10-20 10:31 ` Slark Xiao 2026-10-20 11:42 ` Loic Poulain
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®