USB: Only treat lasting over-current conditions as errors
commit752d57a8b7b97423bffa3452638aa0fd3c3bb9d1
authorPaul Bolle <pebolle@tiscali.nl>
Fri, 11 Mar 2011 17:03:52 +0000 (11 18:03 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Mar 2011 22:18:52 +0000 (11 14:18 -0800)
treee4589fb70401448c0f0393b2fdafe8f4d6923fd6
parent0dfeefbc93e38c3a9bd6d4e579cc5a76d3f13dc2
USB: Only treat lasting over-current conditions as errors

On a laptop I see these errors on (most) resumes:
    hub 3-0:1.0: over-current change on port 1
    hub 3-0:1.0: over-current change on port 2

Since over-current conditions can disappear quite quickly it's better to
downgrade that message to debug level, recheck for an over-current
condition a little later and only print and over-current condition error
if that condition (still) exists when it's rechecked.

Add similar logic to hub over-current changes. (That code is untested,
as those changes do not occur on this laptop.)

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c