]> git.karo-electronics.de Git - mv-sheeva.git/commit
USB: accept 1-byte Device Status replies, fixing some b0rken devices
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 14 Aug 2007 14:56:10 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Aug 2007 21:27:49 +0000 (14:27 -0700)
commit46dede4690bbb23a2c9d60561e2e4fdc3e6bee61
tree98f9a30c7105294df497eb59722a54f70b9a294d
parentf095137e799ddb6a7c2bf0e4c73cda193ab9df41
USB: accept 1-byte Device Status replies, fixing some b0rken devices

Some devices have a bug which causes them to send a 1-byte reply to
Get-Device-Status requests instead of 2 bytes as required by the
spec.  This doesn't play well with autosuspend, since we look for a
valid status reply to make sure the device is still present when it
resumes.  Without both bytes, we assume the device has been
disconnected.

Lack of the second byte shouldn't matter much, since the spec requires
it always to be equal to 0.  Hence this patch (as959) causes
finish_port_resume() to accept a 1-byte reply as valid.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c