aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 9a6b18e31d83..f5d504740281 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -765,7 +765,7 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
765 * 2. Otherwise, we turn all the TRBs in the TD into No-op TRBs (with the chain 765 * 2. Otherwise, we turn all the TRBs in the TD into No-op TRBs (with the chain
766 * bit cleared) so that the HW will skip over them. 766 * bit cleared) so that the HW will skip over them.
767 */ 767 */
768static void handle_stopped_endpoint(struct xhci_hcd *xhci, 768static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci,
769 union xhci_trb *trb, struct xhci_event_cmd *event) 769 union xhci_trb *trb, struct xhci_event_cmd *event)
770{ 770{
771 unsigned int slot_id; 771 unsigned int slot_id;
@@ -1077,9 +1077,8 @@ static void update_ring_for_set_deq_completion(struct xhci_hcd *xhci,
1077 * endpoint doorbell to restart the ring, but only if there aren't more 1077 * endpoint doorbell to restart the ring, but only if there aren't more
1078 * cancellations pending. 1078 * cancellations pending.
1079 */ 1079 */
1080static void handle_set_deq_completion(struct xhci_hcd *xhci, 1080static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci,
1081 struct xhci_event_cmd *event, 1081 struct xhci_event_cmd *event, union xhci_trb *trb)
1082 union xhci_trb *trb)
1083{ 1082{
1084 unsigned int slot_id; 1083 unsigned int slot_id;
1085 unsigned int ep_index; 1084 unsigned int ep_index;
@@ -1171,9 +1170,8 @@ static void handle_set_deq_completion(struct xhci_hcd *xhci,
1171 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); 1170 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1172} 1171}
1173 1172
1174static void handle_reset_ep_completion(struct xhci_hcd *xhci, 1173static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci,
1175 struct xhci_event_cmd *event, 1174 struct xhci_event_cmd *event, union xhci_trb *trb)
1176 union xhci_trb *trb)
1177{ 1175{
1178 int slot_id; 1176 int slot_id;
1179 unsigned int ep_index; 1177 unsigned int ep_index;
@@ -1517,15 +1515,15 @@ bandwidth_change:
1517 complete(&xhci->addr_dev); 1515 complete(&xhci->addr_dev);
1518 break; 1516 break;
1519 case TRB_TYPE(TRB_STOP_RING): 1517 case TRB_TYPE(TRB_STOP_RING):
1520 handle_stopped_endpoint(xhci, xhci->cmd_ring->dequeue, event); 1518 xhci_handle_cmd_stop_ep(xhci, xhci->cmd_ring->dequeue, event);
1521 break; 1519 break;
1522 case TRB_TYPE(TRB_SET_DEQ): 1520 case TRB_TYPE(TRB_SET_DEQ):
1523 handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue); 1521 xhci_handle_cmd_set_deq(xhci, event, xhci->cmd_ring->dequeue);
1524 break; 1522 break;
1525 case TRB_TYPE(TRB_CMD_NOOP): 1523 case TRB_TYPE(TRB_CMD_NOOP):
1526 break; 1524 break;
1527 case TRB_TYPE(TRB_RESET_EP): 1525 case TRB_TYPE(TRB_RESET_EP):
1528 handle_reset_ep_completion(xhci, event, xhci->cmd_ring->dequeue); 1526 xhci_handle_cmd_reset_ep(xhci, event, xhci->cmd_ring->dequeue);
1529 break; 1527 break;
1530 case TRB_TYPE(TRB_RESET_DEV): 1528 case TRB_TYPE(TRB_RESET_DEV):
1531 xhci_dbg(xhci, "Completed reset device command.\n"); 1529 xhci_dbg(xhci, "Completed reset device command.\n");