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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 06fca0835b52..45e4a3108cc3 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1549,6 +1549,15 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
1549 cmd_completion = command->completion; 1549 cmd_completion = command->completion;
1550 cmd_status = &command->status; 1550 cmd_status = &command->status;
1551 command->command_trb = xhci->cmd_ring->enqueue; 1551 command->command_trb = xhci->cmd_ring->enqueue;
1552
1553 /* Enqueue pointer can be left pointing to the link TRB,
1554 * we must handle that
1555 */
1556 if ((command->command_trb->link.control & TRB_TYPE_BITMASK)
1557 == TRB_TYPE(TRB_LINK))
1558 command->command_trb =
1559 xhci->cmd_ring->enq_seg->next->trbs;
1560
1552 list_add_tail(&command->cmd_list, &virt_dev->cmd_list); 1561 list_add_tail(&command->cmd_list, &virt_dev->cmd_list);
1553 } else { 1562 } else {
1554 in_ctx = virt_dev->in_ctx; 1563 in_ctx = virt_dev->in_ctx;
@@ -2272,6 +2281,15 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
2272 /* Attempt to submit the Reset Device command to the command ring */ 2281 /* Attempt to submit the Reset Device command to the command ring */
2273 spin_lock_irqsave(&xhci->lock, flags); 2282 spin_lock_irqsave(&xhci->lock, flags);
2274 reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; 2283 reset_device_cmd->command_trb = xhci->cmd_ring->enqueue;
2284
2285 /* Enqueue pointer can be left pointing to the link TRB,
2286 * we must handle that
2287 */
2288 if ((reset_device_cmd->command_trb->link.control & TRB_TYPE_BITMASK)
2289 == TRB_TYPE(TRB_LINK))
2290 reset_device_cmd->command_trb =
2291 xhci->cmd_ring->enq_seg->next->trbs;
2292
2275 list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list); 2293 list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list);
2276 ret = xhci_queue_reset_device(xhci, slot_id); 2294 ret = xhci_queue_reset_device(xhci, slot_id);
2277 if (ret) { 2295 if (ret) {