Skip to content

Conversation

@linguini1
Copy link
Contributor

Summary

This patch fixes an issue with the read operation where sometimes the file_read call would return a single ASCII hex byte instead of 2 and the parsing logic could not handle that scenario. Now packet data is read in large chunks to an internal buffer and incrementally parsed, making it robust to this problem (and likely much faster).

Closes #17273.

Impact

The driver implementation should no longer have this read bug, and read operations should be faster. This is a change to the internal implementation, doesn't touch documentation or build system.

Testing

Only verified that the code compiles without warnings/errors using the raspberrypi-pico:usbnsh configuration with the driver enabled.

Waiting for fix confirmation from @bskdany after device testing, marked as draft until then.

This patch fixes an issue with the read operation where sometimes the
`file_read` call would return a single ASCII hex byte instead of 2 and
the parsing logic could not handle that scenario. Now packet data is
read in large chunks to an internal buffer and incrementally parsed,
making it robust to this problem (and likely much faster).

Signed-off-by: Matteo Golin <[email protected]>
@linguini1 linguini1 self-assigned this Nov 7, 2025
@github-actions github-actions bot added Area: Drivers Drivers issues Size: M The size of the change in this PR is medium labels Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RN2483 hangs on read

1 participant