Skip to content

kernel: Turn USB data on for every unidentified attachment - #127

Merged
henrikklee merged 1 commit into
OrchardLinux:mainfrom
brkosebay:j71t/usb-hold
Nov 12, 2026
Merged

henrikklee merged 1 commit into
OrchardLinux:mainfrom
brkosebay:j71t/usb-hold

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Part 22 of 23 of the iPad 5 (J71t) series in this repository; merge after #126.

Problem

A transitional USB data hold stayed in place after it was no longer needed, and a long unplug followed by a reconnect kept the old hold deadline.

Change

Release later USB holds, and restart the hold when the cable reconnects. Run the charger poll on an unbound workqueue: it sleeps on I2C and the HDQ gauge and keeps no per-CPU state, and the queue's missing WQ_UNBOUND/WQ_PERCPU flag made alloc_workqueue() warn at every boot. J71t's USB serial and USB networking move to working.

Testing

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered USB serial and networking.
  • Not covered on hardware: the reconnect timing.
  • 2026-11-12: after a USB host session, unplugging the camera adapter and plugging the Mac back in brought USB serial and SSH back on their own.
  • Host: the Linux test suite passes at this branch's head, and the kernel and m1n1 patch series apply on apple-16k and apple-4k. At the top of the series the applied kernel tree is identical to the one in the built release image.
  • Other boards that share these drivers or compatibles have not been tested.

Dependencies

Depends on #126.

This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "power: supply: apple_tristar_charger: Release and restart USB holds".

🤖 Generated with Claude Code

The Lightning charger keeps USB data off from attach until it has
identified the source, at most one second; only the first attachment
since boot got that bound. After an unplug and replug the PMIC can stay
in a transitional state, and USB data then stayed off: no USB serial
and no SSH until a reboot. Every attachment now gets the one-second
bound, at the 500 mA fallback, and the hold starts when input returns.
The charger poll moves to an unbound queue (a boot warning).

This is the same driver on the iPad 5 and iPad 6. J71t USB serial and
USB network are now tested by hand, including after a USB host session.

From orchard PR OrchardLinux#127 (commit 339bd29), folded into one patch that
extends the existing hold instead of adding a second timer.
@henrikklee henrikklee changed the title power: supply: apple_tristar_charger: Release and restart USB holds kernel: Turn USB data on for every unidentified attachment Nov 12, 2026
@henrikklee

Copy link
Copy Markdown
Contributor

Landing this as your commit, folded into one patch: instead of a second timer, the existing one-second USB hold now applies to every attachment, not only the first since probe, and starts when input returns after an unplug. The unbound workqueue is in. Same driver on the iPad 5 and iPad 6. Your previous head is kept as tag contrib/brkosebay-j71t-usb-hold.

@henrikklee
henrikklee merged commit 230a40a into OrchardLinux:main Nov 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants