]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
USB: EHCI: reorganize isochronous scheduler routine
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 14 Jul 2010 15:03:53 +0000 (11:03 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:40 +0000 (14:35 -0700)
commit1fb2e0558781b07d2ecaabf94c81c17ac820d8f0
treeb06dfa7e482664070e688d1b8b2e4e2113dc9099
parentffda080353979273e8aa69fc1e6134f20643ae56
USB: EHCI: reorganize isochronous scheduler routine

This patch (as1408) rearranges the scheduling code in ehci-hcd, partly
to improve its structure, but mainly to change the way it works.
Whether or not a transfer exceeds the hardware schedule length will
now be determined by looking at the last frame the transfer would use,
instead of the first available frame following the end of the transfer.

The benefit of this change is that it allows the driver to accept
valid URBs which would otherwise be rejected.  For example, suppose
the schedule length is 1024 frames, the endpoint period is 256 frames,
and a four-packet URB is submitted.  The four transfers would occupy
slots that are 0, 256, 512, and 768 frames past the current frame
(plus an extra slop factor).  These don't exceed the 1024-frame limit,
so the URB should be accepted.  But the current code notices that the
next available slot would be 1024 frames (plus slop) in the future,
which is beyond the limit, and so the URB is rejected unnecessarily.

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