aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 2e370fea9590..3cac2ff8b50a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -353,11 +353,7 @@ void xhci_event_ring_work(unsigned long arg)
353 if (!xhci->devs[i]) 353 if (!xhci->devs[i])
354 continue; 354 continue;
355 for (j = 0; j < 31; ++j) { 355 for (j = 0; j < 31; ++j) {
356 struct xhci_ring *ring = xhci->devs[i]->eps[j].ring; 356 xhci_dbg_ep_rings(xhci, i, j, &xhci->devs[i]->eps[j]);
357 if (!ring)
358 continue;
359 xhci_dbg(xhci, "Dev %d endpoint ring %d:\n", i, j);
360 xhci_debug_segment(xhci, ring->deq_seg);
361 } 357 }
362 } 358 }
363 359
@@ -839,7 +835,12 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
839 xhci_debug_ring(xhci, xhci->event_ring); 835 xhci_debug_ring(xhci, xhci->event_ring);
840 ep_index = xhci_get_endpoint_index(&urb->ep->desc); 836 ep_index = xhci_get_endpoint_index(&urb->ep->desc);
841 ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index]; 837 ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index];
842 ep_ring = ep->ring; 838 ep_ring = xhci_urb_to_transfer_ring(xhci, urb);
839 if (!ep_ring) {
840 ret = -EINVAL;
841 goto done;
842 }
843
843 xhci_dbg(xhci, "Endpoint ring:\n"); 844 xhci_dbg(xhci, "Endpoint ring:\n");
844 xhci_debug_ring(xhci, ep_ring); 845 xhci_debug_ring(xhci, ep_ring);
845 td = (struct xhci_td *) urb->hcpriv; 846 td = (struct xhci_td *) urb->hcpriv;
@@ -1383,7 +1384,7 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
1383 * or it will attempt to resend it on the next doorbell ring. 1384 * or it will attempt to resend it on the next doorbell ring.
1384 */ 1385 */
1385 xhci_find_new_dequeue_state(xhci, udev->slot_id, 1386 xhci_find_new_dequeue_state(xhci, udev->slot_id,
1386 ep_index, ep->stopped_td, 1387 ep_index, ep->stopped_stream, ep->stopped_td,
1387 &deq_state); 1388 &deq_state);
1388 1389
1389 /* HW with the reset endpoint quirk will use the saved dequeue state to 1390 /* HW with the reset endpoint quirk will use the saved dequeue state to
@@ -1392,10 +1393,12 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
1392 if (!(xhci->quirks & XHCI_RESET_EP_QUIRK)) { 1393 if (!(xhci->quirks & XHCI_RESET_EP_QUIRK)) {
1393 xhci_dbg(xhci, "Queueing new dequeue state\n"); 1394 xhci_dbg(xhci, "Queueing new dequeue state\n");
1394 xhci_queue_new_dequeue_state(xhci, udev->slot_id, 1395 xhci_queue_new_dequeue_state(xhci, udev->slot_id,
1395 ep_index, &deq_state); 1396 ep_index, ep->stopped_stream, &deq_state);
1396 } else { 1397 } else {
1397 /* Better hope no one uses the input context between now and the 1398 /* Better hope no one uses the input context between now and the
1398 * reset endpoint completion! 1399 * reset endpoint completion!
1400 * XXX: No idea how this hardware will react when stream rings
1401 * are enabled.
1399 */ 1402 */
1400 xhci_dbg(xhci, "Setting up input context for " 1403 xhci_dbg(xhci, "Setting up input context for "
1401 "configure endpoint command\n"); 1404 "configure endpoint command\n");