diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 1b20722c102b..7c170a29f959 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -319,6 +319,7 @@ static int ehci_hub_control ( | |||
319 | u32 temp, status; | 319 | u32 temp, status; |
320 | unsigned long flags; | 320 | unsigned long flags; |
321 | int retval = 0; | 321 | int retval = 0; |
322 | unsigned selector; | ||
322 | 323 | ||
323 | /* | 324 | /* |
324 | * FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR. | 325 | * FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR. |
@@ -506,6 +507,8 @@ static int ehci_hub_control ( | |||
506 | } | 507 | } |
507 | break; | 508 | break; |
508 | case SetPortFeature: | 509 | case SetPortFeature: |
510 | selector = wIndex >> 8; | ||
511 | wIndex &= 0xff; | ||
509 | if (!wIndex || wIndex > ports) | 512 | if (!wIndex || wIndex > ports) |
510 | goto error; | 513 | goto error; |
511 | wIndex--; | 514 | wIndex--; |
@@ -559,6 +562,22 @@ static int ehci_hub_control ( | |||
559 | } | 562 | } |
560 | writel (temp, &ehci->regs->port_status [wIndex]); | 563 | writel (temp, &ehci->regs->port_status [wIndex]); |
561 | break; | 564 | break; |
565 | |||
566 | /* For downstream facing ports (these): one hub port is put | ||
567 | * into test mode according to USB2 11.24.2.13, then the hub | ||
568 | * must be reset (which for root hub now means rmmod+modprobe, | ||
569 | * or else system reboot). See EHCI 2.3.9 and 4.14 for info | ||
570 | * about the EHCI-specific stuff. | ||
571 | */ | ||
572 | case USB_PORT_FEAT_TEST: | ||
573 | if (!selector || selector > 5) | ||
574 | goto error; | ||
575 | ehci_quiesce(ehci); | ||
576 | ehci_halt(ehci); | ||
577 | temp |= selector << 16; | ||
578 | writel (temp, &ehci->regs->port_status [wIndex]); | ||
579 | break; | ||
580 | |||
562 | default: | 581 | default: |
563 | goto error; | 582 | goto error; |
564 | } | 583 | } |