Skip to content

Commit

Permalink
USB: fix latency in uhci-hcd and ohci-hcd
Browse files Browse the repository at this point in the history
Commits c44b225 (UHCI: implement new
semantics for URB_ISO_ASAP) and
6a41b4d (OHCI: implement new
semantics for URB_ISO_ASAP) increased the latency for isochronous URBs
in uhci-hcd and ohci-hcd respectively to 2 milliseconds, in an
attempt to avoid underruns.  It turns out that not only was this
unnecessary -- 1-ms latency works okay -- it also causes problems with
certain application loads such as real-time audio.

This patch changes the latency for both drivers back to 1 ms.

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

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Joe Rayhawk <jrayhawk@fairlystable.org>
CC: Clemens Ladisch <clemens@ladisch.de>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 15, 2013
1 parent 997ff89 commit e194401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int ohci_urb_enqueue (
urb->start_frame = frame;
}
} else if (ed->type == PIPE_ISOCHRONOUS) {
u16 next = ohci_frame_no(ohci) + 2;
u16 next = ohci_frame_no(ohci) + 1;
u16 frame = ed->last_iso + ed->interval;

/* Behind the scheduling threshold? */
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/uhci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb,
return -EINVAL; /* Can't change the period */

} else {
next = uhci->frame_number + 2;
next = uhci->frame_number + 1;

/* Find the next unused frame */
if (list_empty(&qh->queue)) {
Expand Down

0 comments on commit e194401

Please sign in to comment.