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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index d67ff71209f5..749fc68eb5c1 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1433,8 +1433,11 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
1433 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code); 1433 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);
1434 break; 1434 break;
1435 case TRB_RESET_DEV: 1435 case TRB_RESET_DEV:
1436 WARN_ON(slot_id != TRB_TO_SLOT_ID( 1436 /* SLOT_ID field in reset device cmd completion event TRB is 0.
1437 le32_to_cpu(cmd_trb->generic.field[3]))); 1437 * Use the SLOT_ID from the command TRB instead (xhci 4.6.11)
1438 */
1439 slot_id = TRB_TO_SLOT_ID(
1440 le32_to_cpu(cmd_trb->generic.field[3]));
1438 xhci_handle_cmd_reset_dev(xhci, slot_id, event); 1441 xhci_handle_cmd_reset_dev(xhci, slot_id, event);
1439 break; 1442 break;
1440 case TRB_NEC_GET_FW: 1443 case TRB_NEC_GET_FW:
@@ -3534,7 +3537,7 @@ static unsigned int xhci_get_burst_count(struct xhci_hcd *xhci,
3534 return 0; 3537 return 0;
3535 3538
3536 max_burst = urb->ep->ss_ep_comp.bMaxBurst; 3539 max_burst = urb->ep->ss_ep_comp.bMaxBurst;
3537 return roundup(total_packet_count, max_burst + 1) - 1; 3540 return DIV_ROUND_UP(total_packet_count, max_burst + 1) - 1;
3538} 3541}
3539 3542
3540/* 3543/*