]> git.baikalelectronics.ru Git - kernel.git/commit
USB: EHCI: improve full-speed isochronous scheduling routine
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 14 May 2012 17:47:20 +0000 (13:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 19:50:22 +0000 (12:50 -0700)
commit4186aee03ce4e69a5b48d0febfe80fc25c11ee9a
tree9c2c0740badd05e06c10a2586e119957e089d394
parent5f5dbcad67ad1b06e3d115bc276589fd57da944b
USB: EHCI: improve full-speed isochronous scheduling routine

This patch (as1555) improves the code ehci-hcd uses while checking the
periodic schedule for isochronous transfers to full-speed devices.  In
addition to making sure that a new transfer does not violate the
restrictions on the high-speed schedule, it also has to check the
restrictions on the full-speed part of the bus, i.e., the part beyond
the Transaction Translator (TT).

It does this by calling tt_available() (or tt_no_collision() if
CONFIG_USB_EHCI_TT_NEWSCHED isn't enabled).  However it calls that
routine on each pass through a loop over the frames being modified,
which is an unnecessary expense because tt_available() (or
tt_no_collision) already does its own loop over frames.  It is
sufficient to do the check just once, before starting the loop.

In addition, the function calls incorrectly converted the transfer's
period from microframes to frames by doing a left shift instead of a
right shift.  The patch fixes this while moving the calls.

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