usb: hub: Clear Port Reset Change during init/resume
authorJulius Werner <jwerner@chromium.org>
Wed, 16 Oct 2013 00:45:00 +0000 (17:45 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 3 Jan 2014 04:33:14 +0000 (04:33 +0000)
commit40c8b4ee658b72eb8c4627c0620a5bb44427d869
tree3aa2ee4d2e042cb412bee35e535f8f6851a03a1e
parent7e6337b694966dd7d3b9d904c830b48a4e6a80a6
usb: hub: Clear Port Reset Change during init/resume

commit e92aee330837e4911553761490a8fb843f2053a6 upstream.

This patch adds the Port Reset Change flag to the set of bits that are
preemptively cleared on init/resume of a hub. In theory this bit should
never be set unexpectedly... in practice it can still happen if BIOS,
SMM or ACPI code plays around with USB devices without cleaning up
correctly. This is especially dangerous for XHCI root hubs, which don't
generate any more Port Status Change Events until all change bits are
cleared, so this is a good precaution to have (similar to how it's
already done for the Warm Port Reset Change flag).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2:
 - Adjust context
 - s/usb_clear_port_feature/clear_port_feature/]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/core/hub.c