diff options
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index e876fd372dd1..2eadf0693862 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -993,6 +993,16 @@ static int handle_tx_event(struct xhci_hcd *xhci, | |||
993 | xhci_warn(xhci, "WARN: short transfer on control ep\n"); | 993 | xhci_warn(xhci, "WARN: short transfer on control ep\n"); |
994 | status = -EREMOTEIO; | 994 | status = -EREMOTEIO; |
995 | break; | 995 | break; |
996 | case COMP_BABBLE: | ||
997 | /* The 0.96 spec says a babbling control endpoint | ||
998 | * is not halted. The 0.96 spec says it is. Some HW | ||
999 | * claims to be 0.95 compliant, but it halts the control | ||
1000 | * endpoint anyway. Check if a babble halted the | ||
1001 | * endpoint. | ||
1002 | */ | ||
1003 | if (ep_ctx->ep_info != EP_STATE_HALTED) | ||
1004 | break; | ||
1005 | /* else fall through */ | ||
996 | case COMP_STALL: | 1006 | case COMP_STALL: |
997 | /* Did we transfer part of the data (middle) phase? */ | 1007 | /* Did we transfer part of the data (middle) phase? */ |
998 | if (event_trb != ep_ring->dequeue && | 1008 | if (event_trb != ep_ring->dequeue && |
@@ -1137,7 +1147,8 @@ static int handle_tx_event(struct xhci_hcd *xhci, | |||
1137 | ep_ring->stopped_td = td; | 1147 | ep_ring->stopped_td = td; |
1138 | ep_ring->stopped_trb = event_trb; | 1148 | ep_ring->stopped_trb = event_trb; |
1139 | } else { | 1149 | } else { |
1140 | if (GET_COMP_CODE(event->transfer_len) == COMP_STALL) { | 1150 | if (trb_comp_code == COMP_STALL || |
1151 | trb_comp_code == COMP_BABBLE) { | ||
1141 | /* The transfer is completed from the driver's | 1152 | /* The transfer is completed from the driver's |
1142 | * perspective, but we need to issue a set dequeue | 1153 | * perspective, but we need to issue a set dequeue |
1143 | * command for this stalled endpoint to move the dequeue | 1154 | * command for this stalled endpoint to move the dequeue |
@@ -1168,7 +1179,8 @@ td_cleanup: | |||
1168 | * control endpoints). | 1179 | * control endpoints). |
1169 | */ | 1180 | */ |
1170 | if (usb_endpoint_xfer_control(&urb->ep->desc) || | 1181 | if (usb_endpoint_xfer_control(&urb->ep->desc) || |
1171 | GET_COMP_CODE(event->transfer_len) != COMP_STALL) { | 1182 | (trb_comp_code != COMP_STALL && |
1183 | trb_comp_code != COMP_BABBLE)) { | ||
1172 | kfree(td); | 1184 | kfree(td); |
1173 | } | 1185 | } |
1174 | urb->hcpriv = NULL; | 1186 | urb->hcpriv = NULL; |