Re: [PATCH] atmel-usba-udc : fix control out requests.

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

 



On Friday 01 May 2009, Martin Fuzzey wrote:
> usbtest #14 was failing with "udc: ep0: TXCOMP: Invalid endpoint state 2, halting endpoint..."
> This occured since ep0 is bidirectional and ep->is_in is not valid (must always use ep->state)
> 
> Signed-off-by: Martin Fuzzey <mfuzzey@xxxxxxxxx>

Cool... worked for me too.  Haavard, any comments?


> 
> ---
> 
>  drivers/usb/gadget/atmel_usba_udc.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
> index 563d572..5644897 100644
> --- a/drivers/usb/gadget/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/atmel_usba_udc.c
> @@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
>  	if (ep->desc) {
>  		list_add_tail(&req->queue, &ep->queue);
>  
> -		if (ep->is_in || (ep_is_control(ep)
> +		if ((!ep_is_control(ep) && ep->is_in) ||
> +			(ep_is_control(ep)
>  				&& (ep->state == DATA_STAGE_IN
>  					|| ep->state == STATUS_STAGE_IN)))
>  			usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY);
> 
> 

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