Skip to content

Commit

Permalink
USB: xhci: Setup HW retries correctly.
Browse files Browse the repository at this point in the history
The xHCI host controller can be programmed to retry a transfer a certain number
of times per endpoint before it passes back an error condition to the host
controller driver.  The xHC will return an error code when the error count
transitions from 1 to 0.  Programming an error count of 3 means the xHC tries
the transfer 3 times, programming it with a 1 means it tries to transfer once,
and programming it with 0 means the HW tries the transfer infinitely.

We want isochronous transfers to only be tried once, so set the error count to
one.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Jul 28, 2009
1 parent fcf8f57 commit 47692d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/host/xhci-mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,13 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,

/* FIXME dig Mult and streams info out of ep companion desc */

/* Allow 3 retries for everything but isoc */
/* Allow 3 retries for everything but isoc;
* error count = 0 means infinite retries.
*/
if (!usb_endpoint_xfer_isoc(&ep->desc))
ep_ctx->ep_info2 = ERROR_COUNT(3);
else
ep_ctx->ep_info2 = ERROR_COUNT(0);
ep_ctx->ep_info2 = ERROR_COUNT(1);

ep_ctx->ep_info2 |= xhci_get_endpoint_type(udev, ep);

Expand Down

0 comments on commit 47692d1

Please sign in to comment.