diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-09-18 06:40:49 -0700 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-10-02 11:20:56 +0200 |
commit | dacbd672cb08f3fea110f6a6e3ef23a180609c9b (patch) | |
tree | 0a2c99c4233e6687098b6f83f2d6c5e19f7f654f | |
parent | 8e56d6505ca37089d29a211f01996e0d744dfa28 (diff) |
usb: xhci: Set 'Error Count' to 0 for isoch endpoints
Per xHCI spec, 'Error Count' should be set to 0 for isoch endpoints.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
-rw-r--r-- | drivers/usb/host/xhci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index dfb188d5e4..93737b083c 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -511,6 +511,7 @@ static int xhci_set_configuration(struct usb_device *udev) unsigned int mult; unsigned int max_burst; unsigned int avg_trb_len; + unsigned int err_count = 0; out_ctx = virt_dev->out_ctx; in_ctx = virt_dev->in_ctx; @@ -588,9 +589,12 @@ static int xhci_set_configuration(struct usb_device *udev) cpu_to_le32(MAX_PACKET (get_unaligned(&endpt_desc->wMaxPacketSize))); + /* Allow 3 retries for everything but isoc, set CErr = 3 */ + if (!usb_endpoint_xfer_isoc(endpt_desc)) + err_count = 3; ep_ctx[ep_index]->ep_info2 |= cpu_to_le32(MAX_BURST(max_burst) | - ((3 & ERROR_COUNT_MASK) << ERROR_COUNT_SHIFT)); + ERROR_COUNT(err_count)); trb_64 = (uintptr_t) virt_dev->eps[ep_index].ring->enqueue; |