Skip to content

Commit

Permalink
Revert "USB: hub: Don't record a connect-change event during reset-re…
Browse files Browse the repository at this point in the history
…sume"

This reverts commit e5d078a.

On Pi 4, an upstream kernel change resulted in disconnect events not being
registered by the kernel when a suspended device was unplugged. Devices that
get autosuspended by default (hubs and webcams) would remain "stuck" in
the kernel's list of attached devices, leading to a nonresponsive port.

Reverting this commit fixes the issue.

See #3546

Signed-off-by: Jonathan Bell <[email protected]>
  • Loading branch information
Jonathan Bell authored and popcornmix committed Apr 27, 2020
1 parent c1f3944 commit 0d64f17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
#ifdef CONFIG_PM
udev->reset_resume = 1;
#endif
/* Don't set the change_bits when the device
* was powered off.
*/
if (test_bit(port1, hub->power_bits))
set_bit(port1, hub->change_bits);

} else {
/* The power session is gone; tell hub_wq */
Expand Down

0 comments on commit 0d64f17

Please sign in to comment.