|
@@ -1819,7 +1819,8 @@ struct xhci_segment *trb_in_td(struct xhci_hcd *xhci,
|
|
static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
|
|
static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
|
|
unsigned int slot_id, unsigned int ep_index,
|
|
unsigned int slot_id, unsigned int ep_index,
|
|
unsigned int stream_id,
|
|
unsigned int stream_id,
|
|
- struct xhci_td *td, union xhci_trb *ep_trb)
|
|
|
|
|
|
+ struct xhci_td *td, union xhci_trb *ep_trb,
|
|
|
|
+ enum xhci_ep_reset_type reset_type)
|
|
{
|
|
{
|
|
struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
|
|
struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
|
|
struct xhci_command *command;
|
|
struct xhci_command *command;
|
|
@@ -1828,12 +1829,14 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
|
|
return;
|
|
return;
|
|
|
|
|
|
ep->ep_state |= EP_HALTED;
|
|
ep->ep_state |= EP_HALTED;
|
|
- ep->stopped_stream = stream_id;
|
|
|
|
|
|
|
|
- xhci_queue_reset_ep(xhci, command, slot_id, ep_index, EP_HARD_RESET);
|
|
|
|
- xhci_cleanup_stalled_ring(xhci, ep_index, td);
|
|
|
|
|
|
+ xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type);
|
|
|
|
|
|
- ep->stopped_stream = 0;
|
|
|
|
|
|
+ if (reset_type == EP_HARD_RESET) {
|
|
|
|
+ ep->stopped_stream = stream_id;
|
|
|
|
+ xhci_cleanup_stalled_ring(xhci, ep_index, td);
|
|
|
|
+ ep->stopped_stream = 0;
|
|
|
|
+ }
|
|
|
|
|
|
xhci_ring_cmd_db(xhci);
|
|
xhci_ring_cmd_db(xhci);
|
|
}
|
|
}
|
|
@@ -1965,7 +1968,8 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
|
|
* The class driver clears the device side halt later.
|
|
* The class driver clears the device side halt later.
|
|
*/
|
|
*/
|
|
xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,
|
|
xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index,
|
|
- ep_ring->stream_id, td, ep_trb);
|
|
|
|
|
|
+ ep_ring->stream_id, td, ep_trb,
|
|
|
|
+ EP_HARD_RESET);
|
|
} else {
|
|
} else {
|
|
/* Update ring dequeue pointer */
|
|
/* Update ring dequeue pointer */
|
|
while (ep_ring->dequeue != td->last_trb)
|
|
while (ep_ring->dequeue != td->last_trb)
|