Repository navigation
usb: Register the hotplug callback for any USB device class - #284
Open
niconistal wants to merge 1 commit into
Open
niconistal wants to merge 1 commit into
niconistal wants to merge 1 commit into
Conversation
usb_init() registered the libusb hotplug callback with dev_class 0, so only devices whose device descriptor announces class 0 produced arrival and departure events. Apple devices that report another device class were never seen by the hotplug path and only picked up by polling, if at all. One such device is the Apple T1 coprocessor (iBridge1,1, 05ac:8600 / 05ac:1281 in recovery) in the 2016 and 2017 Touch Bar MacBook Pros, which re-enumerates several times during an EmbeddedOS restore driven through usbmuxd and idevicerestore. Match LIBUSB_HOTPLUG_MATCH_ANY for the device class, as is already done for the product id; the callback itself still filters by the Apple vendor id. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
usb_init()registers the libusb hotplug callback withdev_class0, so only devices whose descriptor announces device class 0 produce arrival and departure events. An Apple device that reports another class is never seen by the hotplug path.One such device is the Apple T1 coprocessor (
iBridge1,1,05ac:8600, or05ac:1281in recovery) in the 2016 and 2017 Touch Bar MacBook Pros. It re-enumerates several times during an EmbeddedOS restore driven through usbmuxd and idevicerestore, and each re-enumeration was missed.This matches
LIBUSB_HOTPLUG_MATCH_ANYfor the device class, as is already done for the product id. The callback itself still filters on the Apple vendor id, so nothing outside05acis affected.Testing. Used in a Linux-only T1 EmbeddedOS restore on a MacBookPro14,3 (t1-revive, which carries this as its only usbmuxd change): with it, usbmuxd follows the T1 through every reset of the restore; without it the daemon never sees the device come back. Normal iPhone operation unchanged in my use.
One line, offered under the project's existing GPL-2.0-only OR GPL-3.0-only terms.
🤖 Generated with Claude Code