Re: [PATCH 11/22] usb: dwc3: gadget: clear LST from previous TRB on Update Transfer

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

 



Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> writes:

> If we're going to issue a Update Transfer command,
> let's clear LST bit from previous TRB. This will let
> us continue processing TRBs and convert previous IRQ
> into XferInProgress, instead of XferComplete.
> 
> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/dwc3/gadget.c | 32 +++++++++++++++++++++++---------
>  1 file changed, 23 insertions(+), 9 deletions(-)

< snip >

> +	/*
> +	 * When trying to issue Update Transfer, we can remove LST bit from
> +	 * previous TRB and avoid a XferComplete
> +	 */
> +	if (!starting) {
> +		trb = &dep->trb_pool[dep->trb_enqueue - 1];
> +		if (trb->ctrl & DWC3_TRB_CTRL_HWO)
> +			trb->ctrl &= ~DWC3_TRB_CTRL_LST;

Hi Felipe,

This violates the DWC USB3 programming model. Once the HWO bit has been set
and the transfer started, the host is not allowed to modify any of the
fields in the TRB until the controller clears the HWO bit, or the transfer 
completes or is halted.

-- 
Paul


--
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