• Alan Stern's avatar
    USB: EHCI: fix bug in Iso scheduling · b40e43fc
    Alan Stern authored
    This patch (as1098) changes the way ehci-hcd schedules its periodic
    Iso transfers.  That the current scheduling code is wrong is clear on
    the face of it: Sometimes it returns -EL2NSYNC (meaning that an URB
    couldn't be scheduled because it was submitted too late), but it does
    this even when the URB_ISO_ASAP flag is set (meaning the URB should be
    scheduled as soon as possible).
    
    The new code properly implements as-soon-as-possible scheduling,
    assigning the next unexpired slot as the URB's starting point.  It
    also is more careful about checking for Iso URB completion: It doesn't
    bother to check for activity during frames that are already over,
    and it allows for the possibility that some of the URB's packets may
    have raced the hardware when they were submitted and so never got used
    (the packet status is set to -EXDEV).
    
    This fixes problems several people have experienced with USB video
    applications.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    b40e43fc
ehci-sched.c 59.4 KB