]> git.baikalelectronics.ru Git - kernel.git/commit
USB: OHCI: add check for stopped frame counter
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 18 Jul 2014 20:26:17 +0000 (16:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 23:34:29 +0000 (16:34 -0700)
commit43d60d3e9e67e599d280b4d4c574bb08ea0cccba
tree4f33ecaf596af157df8a4cdccbf1fd2ea5f6e3f0
parent80683b9713a0d678358c349aba5c85f48ab5babf
USB: OHCI: add check for stopped frame counter

This patch adds an extra check to ohci-hcd's I/O watchdog routine.  If
the controller stops updating the frame counter, we will assume it is
dead.  But there has to be an exception: Some controllers stop the
frame counter when no ports are connected.  Check to make sure there
is at least one active port before deciding the controller is dead.

(This test may appear racy, but it isn't.  Enabling a newly connected
port takes several milliseconds, during which time the frame counter
must advance.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Dennis New <dennisn@dennisn.linuxd.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci.h