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

Disconnect issue with FL5000_Ver 2.0 Dev board #1

Open
liquiddrop opened this issue Feb 2, 2018 · 0 comments
Open

Disconnect issue with FL5000_Ver 2.0 Dev board #1

liquiddrop opened this issue Feb 2, 2018 · 0 comments

Comments

@liquiddrop
Copy link

I have taken the code from here and build it into a Android build and flashed it to my phone. On first connect everything seems to be working and I am able to plug usb2 and usb3 devices into my dev board and use them for the phone. But when I disconnect from the board the usb connection on my phone wont re-enumerate with any device (ie I can't plug it back into the board and have it work and I can't plug it into my computer and shell into it using adb). After looking into this more here is a timeline of what is happening:

Disconnect the usb
Hub.c code gets a port change status event which goes on to hub workqueue(hub_wq)
Hub.c handles the event in hub_event()
The port change status kicks off a disconnect in the ehub code
The disconnect in the ehub code calls usb_remove_hcd()
Usb_remove_hcd() calls usb_flush_hub_wq() which tries to flush hub_wq
The flush stalls waiting for hub_wq to finish executing and we get stuck there

So looks like the hub work queue is getting into a dead lock situation. I removed usb_remove_hcd() from the ehub code and I am able to disconnect and reconnect with everything working, but this is leaving virtual hubs attached on my phone and the phone is just assigning new hub numbers every time I reconnect. Any guidance you could give on this would be appreciated.

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

No branches or pull requests

1 participant