mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
c998da0d67
commit
1b108880e6
1 changed files with 4 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue