Re: [PATCH] bus: mhi: pci_generic: Fix erroneous system suspend abort

From: Loic Poulain

Date: Fri Nov 13 2026 - 14:43:59 EST


On Fri, Nov 13, 2026 at 3:09 PM Len Brown <lenb@xxxxxxxxxx> wrote:
>
> > > This 1-line fix should be applied NOW, without waiting for internal
> > > mhi internal or development.
> >
> > Fair enough, but would only ignoring error on -EBUSY would work for
> > you? as this is clearly something which is not relevant for system
> > wide suspend cases.
>
> Although I've seen only -EBUSY, I would turn that around...
> Are there ANY mhi suspend cases that merit aborting system wide suspend?
> If there are, then check for those and explicitly abort system suspension.
> (experience shows that these scenarios are quite rare, and it would
> be remarkable if there were such a condition here)

Taking a second look, it seems that we're not propagating the error
from MHI core in mhi_pci_runtime_suspend() and simply return always
-EBUSY instead, making it the only error that is reported anyway.

So your patch is fine as it stands as an immediate fix (along with the
comment). We can then work on a proper long-term solution separately.

>
> > Also would it be possible to add a small inline comment saying we
> > purposely ignore this because of buggy mhi suspend handling.
>
> I agree. I'll add a comment to clarify.
>
> > With your patch what happens on the system resume path? is the MHI
> > device recovered?
>
> This laptop is generally quite a good suspend-resume regression test bed.
> It does actually have a wireless modem, but AFAIK, the device itself
> is always unused.
>
> $ lspci -nnk | grep -B 2 -A 3 -i mhi
> 08:00.0 Unassigned class [ff00]: Quectel Wireless Solutions Co., Ltd.
> Device [1eac:1007]
> Subsystem: Quectel Wireless Solutions Co., Ltd. Device [1eac:100c]
> Kernel driver in use: mhi-pci-generic
> Kernel modules: mhi_pci_generic
>
> I have over 28,000 suspend resume results on its local drive, dating
> back to Linux-7.2.
> The most recent 3,000 cycles included this one line patch and showed no issues.
> There were 9 suspend failures on a run of 2,500 suspend cycles run Nov
> 8 - Nov 9.

It would be worth including this result/info in the commit message.

> I've attached the mhi messages, as they'd wrap if I pasted them here.
>
> Twice we see this:
> mhi-pci-generic 0000:08:00.0: Unbalanced pm_runtime_enable!
>
> perhaps a hint?

Thanks, I will look at this.

Regards,
Loic