From 499b3803d3e2f062f73bf22372b38393369ffcbf Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Fri, 18 Jul 2014 16:26:17 -0400 Subject: 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 Tested-by: Dennis New Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/host/ohci.h') diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 0548f5ca18e2..59f424567a8d 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -421,6 +421,7 @@ struct ohci_hcd { // there are also chip quirks/bugs in init logic + unsigned prev_frame_no; unsigned wdh_cnt, prev_wdh_cnt; u32 prev_donehead; struct timer_list io_watchdog; -- cgit v1.2.3