Skip to content

dwc_otg: Fixes for root port disconnect issues #2010

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

Merged
merged 3 commits into from
May 15, 2017

Conversation

P33M
Copy link
Contributor

@P33M P33M commented May 15, 2017

See #1272.

Repeatedly toggling buspower now no longer crashes the Pi for me with these fixes applied.

P33M added 3 commits May 12, 2017 12:47
On root port disconnect events, the host driver state is cleared and
in-progress host channels are forcibly stopped. This doesn't play
well with the FIQ running in the background, so:
- Guard the disconnect callback with both the host spinlock and FIQ
  spinlock
- Move qtd dereference in dwc_otg_handle_hc_fsm() after the early-out
  so we don't dereference a qtd that has gone away
- Turn catch-all BUG()s in dwc_otg_handle_hc_fsm() into warnings.
The lock serves no purpose as it is only held while the HCD spinlock
is already being held.
…rrupt

Host channels are already halted in kill_urbs_in_qh_list() with the
subsequent interrupt processing behaving as if the URB was dequeued
via HCD callback.

There's no need to clobber the host channel registers a second time
as this exposes races between the driver and host channel resulting
in hcd->free_hc_list becoming corrupted.
@P33M P33M changed the title Usb fixes 4 dwc_otg: Fixes for root port disconnect issues May 15, 2017
@popcornmix popcornmix merged commit 1423ac8 into raspberrypi:rpi-4.9.y May 15, 2017
popcornmix added a commit to raspberrypi/firmware that referenced this pull request May 15, 2017
kernel: dwc_otg: Fixes for root port disconnect issues
See: raspberrypi/linux#2010

kernel: BCM270X_DT: Tidy up mmc, sdhost, sdio overlays
See: raspberrypi/linux#2003

firmware: platform: Move trait initialisation out of #ifdef'd function

firmware: usb: Change USB PHY settings to make device mode work correctly

firmware: dtoverlay: Update fixups when a node is renamed
firmware: dtoverlay app: Add the -D (dry-run) option
See: raspberrypi/linux#2002

firmware: dispserver: Adjust open/close refcount on application exit
See: #778

firmware: filex: Optimise directory search of the root directory
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request May 15, 2017
kernel: dwc_otg: Fixes for root port disconnect issues
See: raspberrypi/linux#2010

kernel: BCM270X_DT: Tidy up mmc, sdhost, sdio overlays
See: raspberrypi/linux#2003

firmware: platform: Move trait initialisation out of #ifdef'd function

firmware: usb: Change USB PHY settings to make device mode work correctly

firmware: dtoverlay: Update fixups when a node is renamed
firmware: dtoverlay app: Add the -D (dry-run) option
See: raspberrypi/linux#2002

firmware: dispserver: Adjust open/close refcount on application exit
See: raspberrypi/firmware#778

firmware: filex: Optimise directory search of the root directory
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