diff options
| -rw-r--r-- | drivers/usb/core/hcd.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 1609623ec829..ce3f453f02ef 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
| @@ -488,28 +488,39 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) | |||
| 488 | case DeviceRequest | USB_REQ_GET_DESCRIPTOR: | 488 | case DeviceRequest | USB_REQ_GET_DESCRIPTOR: |
| 489 | switch (wValue & 0xff00) { | 489 | switch (wValue & 0xff00) { |
| 490 | case USB_DT_DEVICE << 8: | 490 | case USB_DT_DEVICE << 8: |
| 491 | if (hcd->driver->flags & HCD_USB3) | 491 | switch (hcd->driver->flags & HCD_MASK) { |
| 492 | case HCD_USB3: | ||
| 492 | bufp = usb3_rh_dev_descriptor; | 493 | bufp = usb3_rh_dev_descriptor; |
| 493 | else if (hcd->driver->flags & HCD_USB2) | 494 | break; |
| 495 | case HCD_USB2: | ||
| 494 | bufp = usb2_rh_dev_descriptor; | 496 | bufp = usb2_rh_dev_descriptor; |
| 495 | else if (hcd->driver->flags & HCD_USB11) | 497 | break; |
| 498 | case HCD_USB11: | ||
| 496 | bufp = usb11_rh_dev_descriptor; | 499 | bufp = usb11_rh_dev_descriptor; |
| 497 | else | 500 | break; |
| 501 | default: | ||
| 498 | goto error; | 502 | goto error; |
| 503 | } | ||
| 499 | len = 18; | 504 | len = 18; |
| 500 | if (hcd->has_tt) | 505 | if (hcd->has_tt) |
| 501 | patch_protocol = 1; | 506 | patch_protocol = 1; |
| 502 | break; | 507 | break; |
| 503 | case USB_DT_CONFIG << 8: | 508 | case USB_DT_CONFIG << 8: |
| 504 | if (hcd->driver->flags & HCD_USB3) { | 509 | switch (hcd->driver->flags & HCD_MASK) { |
| 510 | case HCD_USB3: | ||
| 505 | bufp = ss_rh_config_descriptor; | 511 | bufp = ss_rh_config_descriptor; |
| 506 | len = sizeof ss_rh_config_descriptor; | 512 | len = sizeof ss_rh_config_descriptor; |
| 507 | } else if (hcd->driver->flags & HCD_USB2) { | 513 | break; |
| 514 | case HCD_USB2: | ||
| 508 | bufp = hs_rh_config_descriptor; | 515 | bufp = hs_rh_config_descriptor; |
| 509 | len = sizeof hs_rh_config_descriptor; | 516 | len = sizeof hs_rh_config_descriptor; |
| 510 | } else { | 517 | break; |
| 518 | case HCD_USB11: | ||
| 511 | bufp = fs_rh_config_descriptor; | 519 | bufp = fs_rh_config_descriptor; |
| 512 | len = sizeof fs_rh_config_descriptor; | 520 | len = sizeof fs_rh_config_descriptor; |
| 521 | break; | ||
| 522 | default: | ||
| 523 | goto error; | ||
| 513 | } | 524 | } |
| 514 | if (device_can_wakeup(&hcd->self.root_hub->dev)) | 525 | if (device_can_wakeup(&hcd->self.root_hub->dev)) |
| 515 | patch_wakeup = 1; | 526 | patch_wakeup = 1; |
