usb-host: add usb_host_do_reset function.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 16 Nov 2011 11:37:17 +0000 (12:37 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 23 Nov 2011 16:17:17 +0000 (17:17 +0100)
commit4496d3dbd799d7b923afaacc39e1eaa7306bb496
tree6f4df233c8ad782fa2b542b93b162f6239b8bbd0
parentcf6a9b09cf4b59f870bc6dff5bb857b5fa4d9328
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