Re: [PATCH 07/11] xhci: Remove "FIXME - check all the stream rings for pending cancellations"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/25/2014 11:01 PM, Hans de Goede wrote:
> Even though a Set TR deq ptr command operates on a ring, and an endpoint
> can have multiple rings, we can have only one Set TR deq ptr command pending.
> 
> When an endpoint with streams halts or is stopped to unlink urbs, there
> will only be at most one ring active / one td being executed (the td
> stopped_td points to).
> 
> So when we reset the endpoint (for a halt), or the stop command completes, we
> will queue one Set TR deq ptr command at most, cancelled urbs on other stream
> rings then the one being executed will have there trbs turned to nops, and
> once the hcd gets around to execute that stream ring they will be simply
> skipped.
> 
> So the SET_DEQ_PENDING flag in the endpoint is sufficient protection against
> starting the endpoing before all stream rings are cleaned up.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  drivers/usb/host/xhci-ring.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 77d47c6..493825b 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -327,7 +327,6 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
>  	 * We don't want to restart any stream rings if there's a set dequeue
>  	 * pointer command pending because the device can choose to start any
>  	 * stream once the endpoint is on the HW schedule.
> -	 * FIXME - check all the stream rings for pending cancellations.
>  	 */
>  	if ((ep_state & EP_HALT_PENDING) || (ep_state & SET_DEQ_PENDING) ||
>  	    (ep_state & EP_HALTED))
> 

Acked-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux