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

Fix typos in HCD rusb file #2185

Merged
merged 1 commit into from
Aug 4, 2023
Merged

Fix typos in HCD rusb file #2185

merged 1 commit into from
Aug 4, 2023

Conversation

abakosh
Copy link

@abakosh abakosh commented Jul 27, 2023

Describe the PR
Host Library:
The unplugging process of the USB device might lead to an infinite loop. It is easy to run into this situation if unplugging occurs during the enumeration process. Also, it happens when unplugging while the host and the USB device are doing something.

The issue is really big. As the stack enters an infinite loop when this is happening.

Additional context
I am testing with the RA4M2 family, with no OS. I know this fix is not meant if you are hosting a hub device. However, if you are planning to host a single device, it increases the robustness of plugging/unplugging while busy issue.
This was tested with MSC devices, I can see the improvement.

@hathach I am not sure if this fix is contagious for other scenarios. Please let me know if I need to take care of something else.

Thank you.

@abakosh abakosh force-pushed the clean_RA_HCD branch 3 times, most recently from 7dc8d75 to 137d05f Compare August 3, 2023 15:29
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

unfortunately the "fix" is too hacky. The changes for hcd_rusb2 look good, maybe split this to an seperate PR so that it can be merged.

PS: I did encounter it when enabling highspeed with nxp chip. Will try to look at this soon when I have time.

src/host/usbh.c Outdated Show resolved Hide resolved
@abakosh abakosh changed the title Host immature removal of USB devices handling Fix typos in HCD rusb file Aug 4, 2023
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

look good, hw test failed is due to the new addition of new hardware. We have to specific jlink serial so that It connect to correct board. GIve me some time to fix this. Once done, this will be merged. Thank you

@hathach hathach merged commit 3db9452 into hathach:master Aug 4, 2023
40 of 41 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