rocknix: Update 260817 - #445
Merged
Merged
Conversation
uMTP-Responder is built with CONFIG_USB_SS_SUPPORT commented out in inc/buildconf.h, so the descriptor blob it writes to functionfs only carries FUNCTIONFS_HAS_FS_DESC and FUNCTIONFS_HAS_HS_DESC. On a gadget whose configfs max_speed is left at its default of super-speed-plus, usb_add_function() never sets config->superspeed, and once the link comes up at SuperSpeed config_desc() skips the only configuration and returns -EINVAL. That stalls GET_DESCRIPTOR(CONFIGURATION): the UDC stays at "addressed" forever and Windows reports the device as "Unknown USB Device (Configuration Descriptor Request Failed)". Cap the MTP gadget at high speed so the descriptors it has are the ones the host asks for. The network gadget is untouched and keeps SuperSpeed, since f_ncm supplies real ss_descriptors. Two more things were wrong once enumeration got that far: bDeviceClass was 0x02, copied from the CDC gadget. A non-zero device class makes hosts bind on it rather than falling through to the interface, so Windows looked for a CDC driver instead of matching umtprd's 06/01/01 plus the "MTP" interface string. Set it to 0. The MTP gadget also shared 1d6b:0104 with the network gadget, so both modes landed on one entry in the host's driver cache. Move MTP to 1d6b:0100, which is what /etc/umtprd/umtprd.conf already declares. QUIRK_DEVICE is only exported into a login shell. Anything invoking usbgadget without one wrote an empty product string, which is a zero length iProduct on the wire. With the speed, class and product ID all corrected, the gadget still stopped at "addressed" until the product string was populated. Resolve the model directly instead of trusting the environment. Finally, usb_stop() unmounted /dev/ffs-umtp before killing umtprd, which holds ep0 open, so the umount always failed with EBUSY and left the mount behind for the next start to trip over. Kill first, then unmount. Tested on an AYN Odin 2 (SM8550, USB 3.1 capable dwc3). Against Windows 11, file transfer enumerates at high speed, reaches "configured", shows up as an MTP device and supports browsing, copying, renaming and deleting under /storage/roms. Against Ubuntu 24.04, lsusb reports the expected 06/01/01 interface, mtp-detect opens a session and reports the storage as read/write, and a file sent and read back is byte identical before being deleted again. Cycling file_transfer to network and back leaves no stale functionfs mount, umtprd or udhcpd behind, and network mode still links at SuperSpeed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
usbgadget: make MTP file transfer enumerate on SuperSpeed hosts
libmali: cosmetic cleanup
EFI: consume installed device tree
lsfg-vk: add enable environment setting
SM8750: port sm8550 patch + silence spam
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.
Summary
Testing
Additional Context
AI Usage
While ROCKNIX doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? YES | PARTIALLY | NO