]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb:hub set hub->change_bits when over-current happens
authorShen Guang <shenguang10@gmail.com>
Wed, 8 Jan 2014 06:45:42 +0000 (14:45 +0800)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:11:31 +0000 (15:11 +0100)
commit5436a41fe9dc95db899e96c10032c90626e289bb
tree499a95b5666fb3b5afb5a167d54b6b4d958ae84f
parent470023f49367ce285fc8c5644192e6ab6ea2772b
usb:hub set hub->change_bits when over-current happens

commit 08d1dec6f4054e3613f32051d9b149d4203ce0d2 upstream.

When we are doing compliance test with xHCI, we found that if we
enable CONFIG_USB_SUSPEND and plug in a bad device which causes
over-current condition to the root port, software will not be noticed.
The reason is that current code don't set hub->change_bits in
hub_activate() when over-current happens, and then hub_events() will
not check the port status because it thinks nothing changed.
If CONFIG_USB_SUSPEND is disabled, the interrupt pipe of the hub will
report the change and set hub->event_bits, and then hub_events() will
check what events happened.In this case over-current can be detected.

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