RE: [PATCH] usb: dwc3: Reset the transfer resource index on SET_INTERFACE

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

 



Hi,

> -----Original Message-----
> From: John Youn [mailto:John.Youn@xxxxxxxxxxxx]
> Sent: Monday, September 17, 2001 12:30 PM
> To: balbi@xxxxxx; Subbaraya Sundeep Bhatta
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Subject: [PATCH] usb: dwc3: Reset the transfer resource index on
> SET_INTERFACE
> 
> This fixes an issue introduced in a previous patch that added checking of the
> return status of device endpoint commands. It caught the Set Endpoint
> Transfer Resource command failing occasionally. This is because the
> Transfer Resource Index was not getting reset during a SET_INTERFACE
> request.
> 
> Signed-off-by: John Youn <johnyoun@xxxxxxxxxxxx>
> ---
>  drivers/usb/dwc3/ep0.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 
> diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index
> 2ef3c8d..69e769c 100644
> --- a/drivers/usb/dwc3/ep0.c
> +++ b/drivers/usb/dwc3/ep0.c
> @@ -727,6 +727,10 @@ static int dwc3_ep0_std_request(struct dwc3
> *dwc, struct usb_ctrlrequest *ctrl)
>  		dwc3_trace(trace_dwc3_ep0,
> "USB_REQ_SET_ISOCH_DELAY");
>  		ret = dwc3_ep0_set_isoch_delay(dwc, ctrl);
>  		break;
> +	case USB_REQ_SET_INTERFACE:
> +		dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_INTERFACE");
> +		dwc->start_config_issued = false;
> +		/* Fall through */

This is the exact patch I had in my mind after reading databook for SetConfiguration/SetInterface. 
I will test and let you know the results.

Thanks,
Sundeep.

>  	default:
>  		dwc3_trace(trace_dwc3_ep0, "Forwarding to gadget
> driver");
>  		ret = dwc3_ep0_delegate_req(dwc, ctrl);
> --
> 2.3.2

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