]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: Prepare for refactoring by adding extra udev checks.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 8 Mar 2013 00:24:22 +0000 (16:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:29:51 +0000 (11:29 -0700)
commite850004e595d6322c6b7ccbfe21a4582051ad56b
tree250637573ab5224f068a63723d461ac6d7a7c2ba
parentac79dc9b4a929bd8c0d9e4a2fccd3b7215cbaee4
USB: Prepare for refactoring by adding extra udev checks.

[This is upstream commit 2d4fa940f99663c82ba55b2244638833b388e4e2.
It needs to be backported to kernels as old as 3.2, because it fixes the
buggy commit 9dbcaec830cd97f44a0b91b315844e0d7144746b "USB: Handle warm
reset failure on empty port."]

The next patch will refactor the hub port code to rip out the recursive
call to hub_port_reset on a failed hot reset.  In preparation for that,
make sure all code paths can deal with being called with a NULL udev.
The usb_device will not be valid if warm reset was issued because a port
transitioned to the Inactive or Compliance Mode on a device connect.

This patch should have no effect on current behavior.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c