aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorXenia Ragiadakou <burzalodowa@gmail.com>2013-09-09 06:29:50 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-10-16 15:24:28 -0400
commit20e7acb13ff48fbc884d5918c3697c27de63922a (patch)
tree7bb80a06ac376a11a86afff87db4cf4e1bb00262 /drivers/usb/host/xhci-ring.c
parent9b3103ac9d19525781c297c4fb1e544e077c8901 (diff)
xhci: use completion event's slot id rather than dig it out of command
Since the slot id retrieved from the Reset Device TRB matches the slot id in the command completion event, which is available, there is no need to determine it again. This patch removes the uneccessary reassignment to slot id and adds a WARN_ON in case the two Slot ID fields differ (although according xhci spec rev1.0 they should not differ). Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index e3b61b834aeb..88939b798ac6 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1547,9 +1547,9 @@ bandwidth_change:
1547 xhci_handle_cmd_reset_ep(xhci, event, xhci->cmd_ring->dequeue); 1547 xhci_handle_cmd_reset_ep(xhci, event, xhci->cmd_ring->dequeue);
1548 break; 1548 break;
1549 case TRB_TYPE(TRB_RESET_DEV): 1549 case TRB_TYPE(TRB_RESET_DEV):
1550 WARN_ON(slot_id != TRB_TO_SLOT_ID(
1551 le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3])));
1550 xhci_dbg(xhci, "Completed reset device command.\n"); 1552 xhci_dbg(xhci, "Completed reset device command.\n");
1551 slot_id = TRB_TO_SLOT_ID(
1552 le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3]));
1553 virt_dev = xhci->devs[slot_id]; 1553 virt_dev = xhci->devs[slot_id];
1554 if (virt_dev) 1554 if (virt_dev)
1555 handle_cmd_in_cmd_wait_list(xhci, virt_dev, event); 1555 handle_cmd_in_cmd_wait_list(xhci, virt_dev, event);