USB: EHCI: fix bug in scheduling periodic split transfers
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 30 Jan 2013 21:36:40 +0000 (16:36 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Feb 2013 03:15:22 +0000 (03:15 +0000)
commit432257fa1d0fe223fb0ee4ada55cfea096572a74
tree844f5ecf677126bf545f8b73657a2e6703404331
parentc0e2ce8b690f9af541f1bc29e431185723bcc963
USB: EHCI: fix bug in scheduling periodic split transfers

commit 3e619d04159be54b3daa0b7036b0ce9e067f4b5d upstream.

This patch (as1654) fixes a very old bug in ehci-hcd, connected with
scheduling of periodic split transfers.  The calculations for
full/low-speed bus usage are all carried out after the correction for
bit-stuffing has been applied, but the values in the max_tt_usecs
array assume it hasn't been.  The array should allow for allocation of
up to 90% of the bus capacity, which is 900 us, not 780 us.

The symptom caused by this bug is that any isochronous transfer to a
full-speed device with a maxpacket size larger than about 980 bytes is
always rejected with a -ENOSPC error.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/ehci-sched.c