Re: [PATCH 1/1] usb: chipidea: udc: delete wrong warning message for ep0in

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

 



On Mon, Jan 20, 2014 at 09:13:11AM +0800, Peter Chen wrote:
> The idea of this message is: the non-ep0 should not use ctrl
> transfer. But it does not cover the ep0in which uses ctrl
> transfer too.
> 
> This commit deletes the warning message at interrupt handler,
> and adds judgement at ep_enable, if non-ep0 requests ctrl transfer,
> it will indicate an error.
> 
> Reported-by: Michael Grzeschik <mgr@xxxxxxxxxxxxxx>
> Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/udc.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 09366b4..646d958 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1001,11 +1001,6 @@ __acquires(ci->lock)
>  		    !hw_test_and_clear_setup_status(ci, i))
>  			continue;
>  
> -		if (i != 0) {
> -			dev_warn(ci->dev, "ctrl traffic at endpoint %d\n", i);
> -			continue;
> -		}
> -
>  		/*
>  		 * Flush data and handshake transactions of previous
>  		 * setup packet.
> @@ -1201,6 +1196,11 @@ static int ep_enable(struct usb_ep *ep,
>  		retval |= hw_ep_enable(hwep->ci, hwep->num, hwep->dir,
>  				       hwep->type);
>  
> +	if (hwep->num != 0 && hwep->type == USB_ENDPOINT_XFER_CONTROL) {
> +		dev_err(hwep->ci->dev, "Set control xfer at non-ep0\n");
> +		retval = -EINVAL;
> +	}
> +
>  	spin_unlock_irqrestore(hwep->lock, flags);
>  	return retval;
>  }
> -- 
> 1.7.8
> 
> 

Michael, this patch may not fix your problem totally, as a temp solution,
you can use the matthieu's patch at your email thread.

-- 

Best Regards,
Peter Chen

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