On 03/05/2016 09:43 AM, Anand Moon wrote:
> From: Ted Chen <tedc...@realtek.com>
> 
> From: Ted Chen <tedc...@realtek.com>
> 
> type is USB_REQ_SET_ADDRESS or USB_REQ_SET_CONFIGURATION.
> To: ma...@denx.de, swar...@nvidia.com, u-boot@lists.denx.de
> Cc: linux.am...@gmail.com, Ted Chen <tedc...@realtek.com>
> 
> Add a condition of set_address and set_configuration to check
> if the request is standardized.

Can you please rephrase the commit message ? It's really hard to
understand. I believe such a patch will be needed for ehci as well,
can you prepare one ?

> Signed-off-by: Ted Chen <tedc...@realtek.com>
> ---
> Resend this patch it some how got missed
> Changes since v1: None.
> 
> Tested on Odroid XU4: with Ethernet USB3.0 RT8153-VB
> ---
>  drivers/usb/host/xhci.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index ca598aa..cb8a04b 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -941,10 +941,12 @@ static int _xhci_submit_control_msg(struct usb_device 
> *udev, unsigned long pipe,
>       if (usb_pipedevice(pipe) == ctrl->rootdev)
>               return xhci_submit_root(udev, pipe, buffer, setup);
>  
> -     if (setup->request == USB_REQ_SET_ADDRESS)
> +     if (setup->request == USB_REQ_SET_ADDRESS &&
> +        (setup->requesttype & USB_TYPE_MASK) == USB_TYPE_STANDARD)
>               return xhci_address_device(udev, root_portnr);
>  
> -     if (setup->request == USB_REQ_SET_CONFIGURATION) {
> +     if (setup->request == USB_REQ_SET_CONFIGURATION &&
> +        (setup->requesttype & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
>               ret = xhci_set_configuration(udev);
>               if (ret) {
>                       puts("Failed to configure xHCI endpoint\n");
> 

What happens to the non-standard requests ?

-- 
Best regards,
Marek Vasut
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to