From: Alan Stern Date: Tue, 20 Mar 2007 18:03:31 +0000 (+0100) Subject: USB HID: fix retry & reset logic X-Git-Tag: v2.6.22-rc1~1106^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e2a55f25d255a356bdaf2cb04c71b8d76c307a8;p=pandora-kernel.git USB HID: fix retry & reset logic The USB HID driver fails to reset its error-retry timeout when there has been a long time interval between I/O errors with no successful URB completions in the meantime. As a result, the very next error would trigger an immediate reset, even if it was a chance event occurring long after the previous error. More USB keyboards and mice than one might expect end up getting I/O errors. Almost always this results from hardware problems of one sort of another. For example, people attach the device to a USB extension cable, which degrades the signal. Or they simply have poor quality cables to begin with. Or they use a KVM switch which doesn't handle USB messages correctly. Etc... There have been reports from several users in which these I/O errors would occur more or less randomly, at intervals ranging from seconds to minutes. The error-handling code in hid-core.c was originally meant for situations where a single outage would persist for a few hundred ms (electromagnetic interference, for example). It didn't work right when these more sporadic errors occurred, because of a flaw in the logic which this patch fixes. This patch (as873) fixes that oversight. Signed-off-by: Alan Stern Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed