Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateware.usb.request.standard: pass max packet size to GetDescriptor handler #264

Merged

Conversation

miek
Copy link
Member

@miek miek commented Jun 8, 2024

Previously, enumeration would fail on a low-speed device:

[77942.213251] usb 2-2: new low-speed USB device number 106 using xhci_hcd
[77942.341327] usb 2-2: device descriptor read/64, error -75
[77942.577321] usb 2-2: device descriptor read/64, error -75

which translates to EOVERFLOW 75 Value too large for defined data type.

Looking on the scope, we found that the device was trying to return a longer packet than allowed for GetDescriptor requests:

hil-lowspeed-scope

This change makes sure to pass the max packet size through to the handler to set the limit correctly.

@miek miek requested a review from martinling June 8, 2024 11:56
…handler

Previously, enumeration would fail on a low-speed device as it would try
to return a longer packet that allowed to GetDescriptor requests.

This makes sure to pass the max packet size through to the handler to
set the limit correctly.
@miek miek force-pushed the descriptor_handler_limit_packet_length branch from c30f428 to 9e540ae Compare June 8, 2024 11:58
Copy link
Member

@martinling martinling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this fixes LS enumeration for me.

@miek miek merged commit fe7d811 into greatscottgadgets:main Jun 8, 2024
8 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