Re: [PATCH net] net: wwan: iosm: always send the host sleep message on suspend

From: David Westen

Date: Mon Nov 23 2026 - 19:04:56 EST


On 11/22/26 9:48 PM, netdev-bot+sashiko@xxxxxxxxxx wrote:
> [Severity: Low]
>
> This removes the only callers of ipc_pcie_suspend_s2idle() and
> ipc_pcie_resume_s2idle(). They are __maybe_unused, so a W=1 build won't
> warn. ipc_imem_pm_s2idle_sleep(), ipc_protocol_s2idle_sleep() and
> ipc_pm_set_s2idle_sleep() become dead code along with them.
>
> ipc_pcie->d3l2_support is also still filled from the ACPI _DSM in
> ipc_pcie_probe(), but nothing reads it any more. Should these be removed
> too?
>
> There is also a behaviour change. ipc_pcie_suspend_s2idle() was the only
> code that set bit 0 of ipc_pcie->suspend, and that bit gates IRQ
> processing:
>
> [...]
>
> On D0L12 platforms, MSIs that arrived between the suspend and resume
> callbacks used to be dropped. Now they go to ipc_imem_irq_process() and
> the tasklet. Was this intended?

Yes. v2 removes the s2idle helpers, the _DSM read, d3l2_support and the
suspend bit. The commit message says that MSIs arriving between the
suspend and resume callbacks are now processed, as they already were
with D3L2.
> [Severity: Low]
>
> Is this comment true in general? For platform-manageable devices,
> pci_target_state() returns whatever the firmware chooses:
>
> [...]
>
> So firmware can choose PCI_D0. The commit message describes this as
> platform-specific ("here chooses D3hot"). The comment turns it into a
> general rule and uses it to justify ignoring d3l2_support.
>
> Where firmware keeps the WWAN function in D0 for s2idle, the modem would
> now get the ENTER_SLEEP/EXIT_SLEEP handshake while it stays in D0/L1.2.
> The notes say that case was not tested, and neither were the XMM7560 or
> platforms where the doorbells work.

No, v2 says the PCI core "may" put the device into D3.

> [Severity: Low]
> The Fixes: tag points at be8c936e540f ("net: iosm: power management").
> That commit only added iosm_ipc_pm.c and iosm_ipc_pm.h.
>
> The code this patch changes lives in iosm_ipc_pcie.c. That covers
> ipc_pcie_suspend_cb() and ipc_pcie_resume_cb(), including the switch
> on ipc_pcie->d3l2_support that picked between the s2idle doorbell path
> and the host sleep message path. As far as I can tell, all of it came
> in with 7e98d785ae61 ("net: iosm: entry point").
>
> Should the tag be this instead?
>
> Fixes: 7e98d785ae61 ("net: iosm: entry point")
>
> There is no runtime effect. But the stable tooling and anyone bisecting
> later rely on the tag to find the commit that introduced the behaviour
> being changed, so it is worth pointing at the right one.

Yes, fixed in v2.

> [Severity: Medium]
>
> Every platform now goes through
> ipc_pcie_suspend()->ipc_imem_pm_suspend()->ipc_protocol_suspend(). That
> includes D0L12 platforms and platforms without the _DSM. What happens when
> the handshake fails?
>
> [...]
>
> Could host_pm_state be rolled back on failure, and then either fall back
> to the doorbells or fail the suspend?

Agreed, the state is left at SLEEP_WAIT_D3. v2 adds a patch that sets it
back to ACTIVE when the modem doesn't report itself active in time, as
the path where sending ENTER_SLEEP fails already does.

Suspend still continues after that. Failing it would let a modem that
doesn't answer block every system suspend, and falling back to the
doorbells would use the path this XMM7360 doesn't survive.

An ENTER_SLEEP that times out still counts as success, since
ipc_protocol_msg_send() returns 0 on a timeout. That's older than this
series and affects every message the driver sends, so I'd rather leave
it for a separate change.

> [Severity: Medium]
>
> Every system suspend now depends on ipc_pm_wait_for_device_active(). Can
> it lose the wake ack?

Yes, and the signal case is real too. v2 adds a patch for both: it sets
the bit before testing ap_state, adds the pairing barrier in
ipc_pm_on_link_wake(), reinitializes the completion before each wait,
and waits uninterruptibly, like the wait for the ENTER_SLEEP reply does.

> [Severity: Low]
>
> SIMPLE_DEV_PM_OPS(iosm_ipc_pm, ipc_pcie_suspend_cb, ipc_pcie_resume_cb)
> binds these callbacks to .freeze/.thaw/.poweroff/.restore as well as
> .suspend/.resume. On D0L12 platforms, hibernation therefore also moves from
> the doorbells to the ENTER_SLEEP/EXIT_SLEEP handshake. Is that intended?
>
> [...]
>
> S3 on D0L12 platforms changes too.

Since commit 0b6f6593aa8c ("net: wwan: iosm: Fix hibernation by
re-binding the driver around it") the driver is unbound before
hibernation, so hibernation only reaches these callbacks on older
kernels. v2 says so in the commit message, together with the hardware
it was tested on and what wasn't tested.

S3 changes the same way. Where S3 cuts the card's power, as here, the
modem reboots and resume fails with either protocol; my S3 series
handles that case separately.

Thanks,
David