Repository navigation
omamobile-device-tegu 0.2.6: the USB rescue closes the switch after a replug the gadget didn't see - #280
omamobile-device-tegu 0.2.6: the USB rescue closes the switch after a replug the gadget didn't see#280W4HO-ham wants to merge 1 commit into
Conversation
… replug the gadget didn't see Unplugging the palmtop from the laptop and plugging it back left it off the bus: the switch read 0x00 with VBUS present, but the gadget still read configured, so the rescue never looked. Without a Type-C driver dwc3 hears of no unplug. While configured, the rescue now reads the switch every 10 s.
|
Thank you, good catch, and a careful test. Without a Type-C driver dwc3 never hears about the unplug, so a stale "configured" is exactly the blind spot the rescue had. Opening the switch by hand under a 60 s dead-man, with Tailscale as a second link, was the right way to reproduce it. The change only adds the read-and-close while the gadget is configured, and the unconfigured path is unchanged. The write still goes through One small suggestion, which I'm happy to make at merge if you'd rather not push again: in the configured branch, act only when the switch reads if [[ $sw == 0x00 ]] && vbus_present; thenThanks again! |
|
Landed on main as 78a7a17 (squashed, authored by you), with the edits I described in my last comment. Thank you. |
…ing (#307) The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to. - **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel #178 on #156, both in review) and brcmfmac (kernel #56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after #178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did. - **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (#268, #275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, #284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word. - **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel #125's boot, which also checks the panel ID). - **Charging, Haptics, Torch, NFC:** kernel #161, #96, #104 and #105 are merged. - **USB net:** the rescue also handles a replug the gadget didn't see (#280). The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel #99), the panel ID (kernel #125), the RTC without the PMIC interrupt (kernel #55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers. Closes #307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… replug the gadget didn't see (derekross#280) Without a Type-C driver, dwc3 never hears about an unplug, so after a replug the gadget can still read "configured" while the MAX77779 has opened its USB2 switch. The tegu rescue now also closes the switch in that state. The one write still goes through the guarded helper (the chip's identity, VBUS, 0x00 to 0x09 only, read back). Tested on the palmtop. Maintainer edit at merge: the configured branch acts only on USBSW_CTRL 0x00, the value the helper accepts, so another open value (0x24 is on record) doesn't log every 10 s; a test case covers it. Closes derekross#280 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing (derekross#307) The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to. - **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (derekross#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel derekross#178 on derekross#156, both in review) and brcmfmac (kernel derekross#56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after derekross#178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did. - **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (derekross#268, derekross#275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, derekross#284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word. - **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel derekross#125's boot, which also checks the panel ID). - **Charging, Haptics, Torch, NFC:** kernel derekross#161, derekross#96, derekross#104 and derekross#105 are merged. - **USB net:** the rescue also handles a replug the gadget didn't see (derekross#280). The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel derekross#99), the panel ID (kernel derekross#125), the RTC without the PMIC interrupt (kernel derekross#55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers. Closes derekross#307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This afternoon the palmtop was unplugged from the laptop for a while (a USB-C power test with nothing in host mode) and then plugged back in, and it stayed off the bus, awake and screen on. A replug with the screen on didn't help either. Over Tailscale:
USBSW_CTRLread 0x00 with VBUS present (TCPC_POWER_STATUS0x0c), and the UDC still readconfigured. The rescue only looks at the chip while the gadget is unconfigured, so it never acted. Without a Type-C driver, dwc3 hears of no unplug, so "configured" can be stale.tegu-tcpc-switch connectby hand brought USB back at once.While the gadget reads configured, the rescue now also reads the switch once per
OMAMOBILE_TEGU_RESCUE_STALEseconds (default 10). If it's open with VBUS present, it logs "a replug the gadget didn't see" and closes it. With the switch closed that costs one register read per 10 s; with the cable out it's two (switch, then power) and no write or log line. The unconfigured path is unchanged.Tested on the palmtop (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, this change on top of #238 and #275, so nothing else changed): with the cable in and the gadget configured, I opened the switch the way the chip does after an unplug (i2csetof 0x93 = 0x00, with a 60 s dead-man that writes 0x09 back, and Tailscale as the second link). USB dropped, the rescue logged the close and wrote 0x09 nine seconds later, and SSH over USB answered again. An ordinary 7 s replug with the screen on also came back, without the rescue needing to act.test/usb-rescuecovers the three configured cases (closed: one read; open with VBUS: closed and logged; open with the cable out: no write), andtest/allandtools/pr-checkpass.Version 0.2.6, since #238 and #275 hold 0.2.4 and 0.2.5; set whatever is free at merge.