diff options
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index cf86eb70a62e..032af7e8a6bf 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -380,10 +380,8 @@ static struct xhci_segment *find_trb_seg( | |||
380 | while (cur_seg->trbs > trb || | 380 | while (cur_seg->trbs > trb || |
381 | &cur_seg->trbs[TRBS_PER_SEGMENT - 1] < trb) { | 381 | &cur_seg->trbs[TRBS_PER_SEGMENT - 1] < trb) { |
382 | generic_trb = &cur_seg->trbs[TRBS_PER_SEGMENT - 1].generic; | 382 | generic_trb = &cur_seg->trbs[TRBS_PER_SEGMENT - 1].generic; |
383 | if ((generic_trb->field[3] & TRB_TYPE_BITMASK) == | 383 | if (generic_trb->field[3] & LINK_TOGGLE) |
384 | TRB_TYPE(TRB_LINK) && | 384 | *cycle_state ^= 0x1; |
385 | (generic_trb->field[3] & LINK_TOGGLE)) | ||
386 | *cycle_state = ~(*cycle_state) & 0x1; | ||
387 | cur_seg = cur_seg->next; | 385 | cur_seg = cur_seg->next; |
388 | if (cur_seg == start_seg) | 386 | if (cur_seg == start_seg) |
389 | /* Looped over the entire list. Oops! */ | 387 | /* Looped over the entire list. Oops! */ |
@@ -492,7 +490,7 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, | |||
492 | trb = &state->new_deq_ptr->generic; | 490 | trb = &state->new_deq_ptr->generic; |
493 | if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) && | 491 | if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) && |
494 | (trb->field[3] & LINK_TOGGLE)) | 492 | (trb->field[3] & LINK_TOGGLE)) |
495 | state->new_cycle_state = ~(state->new_cycle_state) & 0x1; | 493 | state->new_cycle_state ^= 0x1; |
496 | next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr); | 494 | next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr); |
497 | 495 | ||
498 | /* | 496 | /* |