diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-07-27 15:04:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-28 17:31:12 -0400 |
commit | 47692d179f7a88794bcd302e53ca7899d7592db9 (patch) | |
tree | 374412711d20bdeb0a925c3b92c9f2f1cdf851e6 /drivers/usb/host/xhci-mem.c | |
parent | fcf8f576beafb8c5db8aee8a73eb73763fa7b0ad (diff) |
USB: xhci: Setup HW retries correctly.
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>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index ec825f16dcee..075e1036bcb4 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -480,11 +480,13 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
480 | 480 | ||
481 | /* FIXME dig Mult and streams info out of ep companion desc */ | 481 | /* FIXME dig Mult and streams info out of ep companion desc */ |
482 | 482 | ||
483 | /* Allow 3 retries for everything but isoc */ | 483 | /* Allow 3 retries for everything but isoc; |
484 | * error count = 0 means infinite retries. | ||
485 | */ | ||
484 | if (!usb_endpoint_xfer_isoc(&ep->desc)) | 486 | if (!usb_endpoint_xfer_isoc(&ep->desc)) |
485 | ep_ctx->ep_info2 = ERROR_COUNT(3); | 487 | ep_ctx->ep_info2 = ERROR_COUNT(3); |
486 | else | 488 | else |
487 | ep_ctx->ep_info2 = ERROR_COUNT(0); | 489 | ep_ctx->ep_info2 = ERROR_COUNT(1); |
488 | 490 | ||
489 | ep_ctx->ep_info2 |= xhci_get_endpoint_type(udev, ep); | 491 | ep_ctx->ep_info2 |= xhci_get_endpoint_type(udev, ep); |
490 | 492 | ||