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 <jonathan@raspberrypi.org>
  • Loading branch information
Jonathan Bell authored and pelwell committed Apr 21, 2020
1 parent c386ab0 commit 68fd7d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/usb/core/hub.c
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 68fd7d5

Please sign in to comment.