From d913666409bab869cad7f5b7913fde1b92a857a2 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Thu, 27 Aug 2009 14:36:03 -0700 Subject: [PATCH] --- yaml --- r: 164935 b: refs/heads/master c: 83fbcdcca03013bb5af130d6d91eba11e3d3269e h: refs/heads/master i: 164933: 07d3369ef30b17638dd575d21a58a4dfb851f147 164931: 08fac489f5feba0b3dda6d1f706c39c300c7568e 164927: 57aef05802905f401c3a070f5e0a7c0693a080fc v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci-ring.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index ae739b8b6a87..eac492f27cb6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66d1eebce5cca916e0b08d961690bb01c64751ef +refs/heads/master: 83fbcdcca03013bb5af130d6d91eba11e3d3269e diff --git a/trunk/drivers/usb/host/xhci-ring.c b/trunk/drivers/usb/host/xhci-ring.c index e876fd372dd1..2eadf0693862 100644 --- a/trunk/drivers/usb/host/xhci-ring.c +++ b/trunk/drivers/usb/host/xhci-ring.c @@ -993,6 +993,16 @@ static int handle_tx_event(struct xhci_hcd *xhci, xhci_warn(xhci, "WARN: short transfer on control ep\n"); status = -EREMOTEIO; break; + case COMP_BABBLE: + /* The 0.96 spec says a babbling control endpoint + * is not halted. The 0.96 spec says it is. Some HW + * claims to be 0.95 compliant, but it halts the control + * endpoint anyway. Check if a babble halted the + * endpoint. + */ + if (ep_ctx->ep_info != EP_STATE_HALTED) + break; + /* else fall through */ case COMP_STALL: /* Did we transfer part of the data (middle) phase? */ if (event_trb != ep_ring->dequeue && @@ -1137,7 +1147,8 @@ static int handle_tx_event(struct xhci_hcd *xhci, ep_ring->stopped_td = td; ep_ring->stopped_trb = event_trb; } else { - if (GET_COMP_CODE(event->transfer_len) == COMP_STALL) { + if (trb_comp_code == COMP_STALL || + trb_comp_code == COMP_BABBLE) { /* The transfer is completed from the driver's * perspective, but we need to issue a set dequeue * command for this stalled endpoint to move the dequeue @@ -1168,7 +1179,8 @@ static int handle_tx_event(struct xhci_hcd *xhci, * control endpoints). */ if (usb_endpoint_xfer_control(&urb->ep->desc) || - GET_COMP_CODE(event->transfer_len) != COMP_STALL) { + (trb_comp_code != COMP_STALL && + trb_comp_code != COMP_BABBLE)) { kfree(td); } urb->hcpriv = NULL;