mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Haerter <ah@foundata.com>
To: chandrashekar.devegowda@intel.com
Cc: haijun.liu@mediatek.com, ricardo.martinez@linux.intel.com,
	loic.poulain@oss.qualcomm.com, ryazanov.s.a@gmail.com,
	johannes@sipsolutions.net, tim770802@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: mtk_t7xx: resume after power loss reported as success, modem stays dead
Date: Fri,  6 Nov 2026 06:46:27 +0100	[thread overview]
Message-ID: <20261106054629.203092-1-ah@foundata.com> (raw)

Hi,

After system suspend the t7xx module on this machine can lose power and
not come back. The PCI core notices, but mtk_t7xx reports the resume as
successful and keeps its ports registered. Userspace is left with a
modem that exists and rejects every write, and only a reboot recovers
it.

I have seen this on 4 of at least 13 s2idle cycles, on Fedora's 7.2.5
to 7.2.15. Line numbers are from current mainline.

  Machine:  LENOVO 21RMCTO1WW (ThinkPad X13 Gen 6), AMD
  Module:   Rolling Wireless RW350R-GL, 14c3:4d75 (2099:3552)
  Firmware: 81601.0000.00.29.25.05_DT
  BIOS:     R32ET20W (1.03), and R32ET28W (1.11) for the latest one

From 7.2.15 on BIOS 1.11, on the first standby after the BIOS update:

  PM: suspend entry (s2idle)
  mtk_t7xx 0000:c3:00.0: Unable to change power state from D3hot to D0,
    device inaccessible
  PM: suspend exit
  mtk_t7xx 0000:c3:00.0: Write error on MBIM port, -19

The driver logs nothing else about it. Config space then reads all ff
(on 7.2.8 it still did seven minutes later), while /dev/wwan0mbim0 and
/dev/wwan0at0 stay present. Runtime PM is not involved: power/control
is "on" and power/runtime_suspended_time reads 0.

The root port 00:02.5 sees nothing either: SltSta shows PresDet-, and
LnkSta shows DLActive- and Train-, with 2.5GT/s x16 on a port that is
x1. So the link is down and the port is not training.
The ACPI power code for this slot (\_SB.PCI0.GPP7, P0WW) is identical
in both BIOS versions.

From the code, not traced:

1. __t7xx_pci_pm_resume() reads T7XX_PCIE_PM_RESUME_STATE at
   t7xx_pci.c:586. From an absent device that gives 0xffffffff, which
   matches none of the PM_RESUME_REG_STATE_* values.
2. It reaches the else-if at t7xx_pci.c:632, sends FSM_CMD_STOP and
   returns 0.
3. t7xx_port_send_skb() returns -ENODEV for MD_STATE_STOPPED
   (t7xx_port_proxy.c:345), which is the -19 above.
4. t7xx_port_wwan_md_state_notify() ignores every state except
   MD_STATE_READY, so the WWAN ports stay registered.

The next system suspend is then refused. On 7.2.5 two attempts each
hung for about 37 s until t7xx_pci_pm_suspend() returned -110, and
systemd-sleep gave up, leaving the machine awake.

Checking pci_device_is_present(), or for an all-ones read, before
acting on prev_state would make the failure visible. The L3 branch
handles power loss but needs the device back on the bus first. What
should the driver do here: fail the resume, or remove the WWAN ports so
userspace notices?

This looks separate from Tim JH Chen's series "fix DPMAIF data path vs
system PM suspend", but I have adjusted CC in case it overlaps.

Thanks,
Andreas

-- 
foundata GmbH
Steinhäuserstr. 20
76135 Karlsruhe

Web: https://foundata.com 
Sitz der Gesellschaft: Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 714807
Geschäftsführung: Andreas Haerter
USt-IdNr.: DE284122682

                 reply	other threads:[~2026-11-06  5:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261106054629.203092-1-ah@foundata.com \
    --to=ah@foundata.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=haijun.liu@mediatek.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ricardo.martinez@linux.intel.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=tim770802@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®