* [PATCH v2] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
@ 2026-10-21 2:40 Slark Xiao
2026-10-21 5:22 ` Val Packett
0 siblings, 1 reply; 3+ messages in thread
From: Slark Xiao @ 2026-10-21 2:40 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>
---
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..1f52542794d7 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
+/* Add define of initial autosuspend_delay_ms 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 v2] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
2026-10-21 2:40 [PATCH v2] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao
@ 2026-10-21 5:22 ` Val Packett
2026-10-21 10:25 ` Slark Xiao
0 siblings, 1 reply; 3+ messages in thread
From: Val Packett @ 2026-10-21 5:22 UTC (permalink / raw)
To: Slark Xiao, mani, jeff.hugo, krishna.chundru
Cc: loic.poulain, mhi, linux-arm-msm, linux-kernel, stable
On 10/20/26 11:40 PM, Slark Xiao wrote:
> For some MHI devices in some specific scenario, the default value
> of autosuspend_delay_ms may not enough to handle last wake event.
Missing verb.. may not *be* enough
> This may lead to some unexpected problems.
Sounds vague, are there any examples of the problems? A short
description of a concrete error message or something would be nice.
> Refer to the Qualcomm's Windows settings and we checked this with
> Quaclomm over case, Qualcomm recommend us to set this as 5000ms.
spelliiiiing. Quaclomm? :)
(also "over case" sounds odd)
> 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.
Please leave the "meta" stuff about where the commit applies outside of
the commit message.
> 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>
> ---
> 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..1f52542794d7 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
>
> +/* Add define of initial autosuspend_delay_ms to accommodate a potential 'late wake-event' issue */
Not a very necessary comment, but if you do add it, please don't write
things like "Add define of". This *is* the define, we're looking at it..
Also, it's not "initial" if it's not a tunable or anything, it's just
*the* delay value.
> +#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);
Thanks,
~val
^ permalink raw reply [flat|nested] 3+ messages in thread* Re:Re: [PATCH v2] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms
2026-10-21 5:22 ` Val Packett
@ 2026-10-21 10:25 ` Slark Xiao
0 siblings, 0 replies; 3+ messages in thread
From: Slark Xiao @ 2026-10-21 10:25 UTC (permalink / raw)
To: Val Packett
Cc: mani, jeff.hugo, krishna.chundru, loic.poulain, mhi,
linux-arm-msm, linux-kernel, stable
At 2026-10-21 13:22:48, "Val Packett" <val@packett.cool> wrote:
>
>On 10/20/26 11:40 PM, Slark Xiao wrote:
>> For some MHI devices in some specific scenario, the default value
>> of autosuspend_delay_ms may not enough to handle last wake event.
>Missing verb.. may not *be* enough
>> This may lead to some unexpected problems.
>Sounds vague, are there any examples of the problems? A short
>description of a concrete error message or something would be nice.
>> Refer to the Qualcomm's Windows settings and we checked this with
>> Quaclomm over case, Qualcomm recommend us to set this as 5000ms.
>
>spelliiiiing. Quaclomm? :)
>
>(also "over case" sounds odd)
>
>> 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.
>Please leave the "meta" stuff about where the commit applies outside of
>the commit message.
>> 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>
>> ---
>> 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..1f52542794d7 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
>>
>> +/* Add define of initial autosuspend_delay_ms to accommodate a potential 'late wake-event' issue */
>
>Not a very necessary comment, but if you do add it, please don't write
>things like "Add define of". This *is* the define, we're looking at it..
>
>Also, it's not "initial" if it's not a tunable or anything, it's just
>*the* delay value.
>
Thanks for your good suggestion. Will commit a V3 version later.
>> +#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);
>
>
>Thanks,
>~val
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-21 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 2:40 [PATCH v2] bus: mhi: host: pci_generic: Update the default autosuspend_delay_ms as 5000ms Slark Xiao
2026-10-21 5:22 ` Val Packett
2026-10-21 10:25 ` Slark Xiao
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®