Repository navigation
PCI: dwc: gs201-cp: turn the sleep guard on for zumapro - #258
Conversation
The system sleep handling for the modem's link (the refusal while the link is up, before the freeze and again at noirq; the root port and the endpoint kept out of the PCI core's sleep path) is behind sleep_guard, and only gs201 sets it. zumapro has the same link driver and CPIF and fails the same way without it: a system sleep with the modem's link down puts the root port in D3hot with the device inaccessible, the resume waits for a link that isn't coming, and CPIF reads 0xffff from the modem's command register until a reboot. Set sleep_guard for zumapro, and say so where the comments name gs201 alone. Tested on a Pixel 9a (tegu) with the modem registered on LTE with IMS voice and SMS, Wi-Fi connected and the cellular data service running: - with the series as it was under review plus the maintainer's two review patches (the second a ring trace, left out of the merge): 300 sleep requests of 60 s in one boot, 299 entered and woke (239 on the RTC alarm, 60 on cp2ap_wakeup) and 1 refused before the freeze with the link up; after every one the CP was ONLINE and the phone service answered. Calls and texts sent to the sleeping palmtop woke it on cp2ap_wakeup, and rang or arrived; - with the series as merged: 10 sleeps entered, none refused or failed, in a boot of 954 link power-ups. In those boots there was no "Unable to change power state", "Link Active not set", "Can't set D0", "BME" or UFS error handler line, and the shutdowns stopped the modem cleanly. Without the guard the same phone lost the modem at the first sleep with the link down. One open point from the same testing, not on the sleep path: a boot of the first build hung once at a link power-up while awake, before the PHY's external PLL lock was reported (the 1,549th power-up of that boot); none in over 15,000 power-ups since, on either build. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
|
A night on the palmtop with this in, for the record: the test kernel
So on the 9a the guard keeps the sleeps safe with the modem up, and the open questions are the same two as on the 7 Pro (#799): whether data survives the wakes, and the current. I'll run the night again with a data check before the cable comes out and after each wake. |
|
Thank you, and thank you for splitting it out as ikegam asked. I ran the gate on it merged onto today's I read it for what it changes. Only zumapro's match data moves, so the 7 Pro is unchanged. On the 9a the guard runs only for a sleep that gets past the modem's inhibitor, which the release keeps. That's exactly the sleep that loses the whole modem without it, so this makes the 9a safer and turns nothing on. It also makes One thing you should know from my 7 Pro. On kernel-2026.11.15, with this same guard code, twenty auto-sleeps with the modem up all entered and woke, but mobile data stopped answering from the first timer wake and stayed down with the phone awake. CPIF logged "Reserve doorbell interrupt: PCI not powered on" while the link came up again and again, and the bearer was still reported up. Wi-Fi was unloaded around each sleep, so mobile data was the only route. I've turned the 7 Pro's modem-up sleep back off. The guard is needed, but it isn't enough yet, and the data path across a wake is now the open question on both phones. I've written on omarchy-mobile#758 what I'd like the 9a to check there. On the night you planned off the charger with the modem registered: please keep modem tests on the charger, and keep sleeps with the modem up to attended runs on the charger that end in a reboot, as AGENTS says. I've written more about that on #758 too. I'll merge this. |
The follow-up to #232 that @ikegam and I agreed on there: its sleep handling is behind
sleep_guard, which only gs201 sets, and this sets it for zumapro (Pixel 9a), with the comments that named gs201 alone updated. One line of code.Without it a sleep with the modem's link down loses the 9a's modem until a reboot (root port D3hot and inaccessible,
Can't set D0, CPIF reading 0xffff).Tested on the palmtop, both forms of the series, numbers in the commit message and in my comments on #232:
cp2ap_wakeup;fef165e7496fbefore the rebase merge) plus this line, release7.3.0-rc6-omamobile-push1-g716f6d8ef355: in use on the palmtop since 11-14, no refusal, failure or link error line.Tonight the palmtop runs a night off the charger on that second build with the modem registered; I'll add the standby current here in the morning.
The one open point, also in the commit message: an awake hang at a link power-up, once, in the first build's 1,549th power-up of a boot; none in over 15,000 since. It isn't on the sleep path, and this line doesn't touch the power-up.
scripts/checkpatch.pl --strict: clean.