Merge branch 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
* 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: xhci: Fix bug in control transfer cancellation.
This commit is contained in:
commit
af5c580501
1 changed files with 9 additions and 9 deletions
|
@ -1641,6 +1641,9 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
|
||||||
else
|
else
|
||||||
*status = 0;
|
*status = 0;
|
||||||
break;
|
break;
|
||||||
|
case COMP_STOP_INVAL:
|
||||||
|
case COMP_STOP:
|
||||||
|
return finish_td(xhci, td, event_trb, event, ep, status, false);
|
||||||
default:
|
default:
|
||||||
if (!xhci_requires_manual_halt_cleanup(xhci,
|
if (!xhci_requires_manual_halt_cleanup(xhci,
|
||||||
ep_ctx, trb_comp_code))
|
ep_ctx, trb_comp_code))
|
||||||
|
@ -1685,15 +1688,12 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Maybe the event was for the data stage? */
|
/* Maybe the event was for the data stage? */
|
||||||
if (trb_comp_code != COMP_STOP_INVAL) {
|
td->urb->actual_length =
|
||||||
/* We didn't stop on a link TRB in the middle */
|
td->urb->transfer_buffer_length -
|
||||||
td->urb->actual_length =
|
TRB_LEN(le32_to_cpu(event->transfer_len));
|
||||||
td->urb->transfer_buffer_length -
|
xhci_dbg(xhci, "Waiting for status "
|
||||||
TRB_LEN(le32_to_cpu(event->transfer_len));
|
"stage event\n");
|
||||||
xhci_dbg(xhci, "Waiting for status "
|
return 0;
|
||||||
"stage event\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue