usb-host: add usb_host_do_reset function.
commitc7662daaa2898fa5a9a39bc51985cd1dd08af988
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 16 Nov 2011 11:37:17 +0000 (16 12:37 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 23 Nov 2011 16:17:17 +0000 (23 17:17 +0100)
tree6f4df233c8ad782fa2b542b93b162f6239b8bbd0
parent335b8d2068cbc56ce86b3c89b0fcd1c1eb4b61e2
usb-host: add usb_host_do_reset function.

Add a special function to reset the host usb device.  It tracks the time
needed by the USBDEVFS_RESET ioctl and prints a warning in case it needs
too long.  Usually it should be finished in 200 - 300 miliseconds.
Warning threshold is one second.

Intention is to help troubleshooting by indicating that the usb device
stopped responding even to a reset request and is possibly broken.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-linux.c