]> git.baikalelectronics.ru Git - kernel.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>
Wed, 15 May 2013 17:42:45 +0000 (13:42 -0400)
commit21af2777c6d51bf8b4a084eaa9324cc0d8971ed8
treed7f02412eaabbf21faa91ca44366d8be76147537
parent7efe5ab2ddd0aad8d02725b15f6fa79ab3f6bb37
USB: OHCI: fix logic for scheduling isochronous URBs

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>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-hcd.c