diff options
author | Ted Chen <tedchen@realtek.com> | 2016-03-18 17:56:52 +1030 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2016-03-20 18:00:45 +0100 |
commit | 1b108880e6433e398681785f51b2a2dca983cd1b (patch) | |
tree | 1f6c38aa92a550ee24ffcf0c610f538a6f1659c7 /drivers/usb/host/xhci.c | |
parent | c998da0d67091f800933e59b8693913764a9e8f4 (diff) | |
download | u-boot-1b108880e6433e398681785f51b2a2dca983cd1b.tar.gz u-boot-1b108880e6433e398681785f51b2a2dca983cd1b.tar.xz u-boot-1b108880e6433e398681785f51b2a2dca983cd1b.zip |
usb: xhci: Fix vendor command error if the request type is USB_REQ_SET_ADDRESS or USB_REQ_SET_CONFIGURATION.
Add test into xhci_submit_control_message for usb requesttype in USB
vendor request being of standardized type. This fixes detection of
certain USB fixes, for example Ethernet, USB 3.0 port. Non standardized
requesttype in USB vendor request will be ignored.
Signed-off-by: Ted Chen <tedchen@realtek.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ca598aa5e6..cb8a04b793 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"); |