]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: OHCI: fix logic for scheduling isochronous URBs
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 14 May 2013 17:57:51 +0000 (13:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:52:22 +0000 (12:52 -0700)
commitaa4ccf7a840cadad4d835869ea96d24ecca42c40
treea984d80c26a3ac4e1987e2770b5432141cfc17c0
parentccc1525f37a888da3abfef899bd746d292793f40
USB: OHCI: fix logic for scheduling isochronous URBs

commit 815fa7b917614261748d1ecd9600ff27f99508e5 upstream.

The isochronous scheduling logic in ohci-hcd has a bug.  The
calculation for skipping TDs that are too late should be carried out
only in the !URB_ISO_ASAP case.  When URB_ISO_ASAP is set, the URB is
pushed back so that none of the TDs are too late, which would cause
the calculation to overflow.

The patch also fixes the calculation to avoid overflow in the case
where the frame value wraps around.

This should be applied to -stable kernels going back to 3.8.

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