Commit 166cf4aa authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Greg Kroah-Hartman

USB: ohci-jz4740: FEAT_POWER is a port feature, not a hub feature

Power control of hub ports target the CLEAR_FEATURE and SET_FEATURE
requests to ports, not to the hub. Fix the hub control function to
detect the request correctly.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d6b5161
...@@ -85,11 +85,11 @@ static int ohci_jz4740_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -85,11 +85,11 @@ static int ohci_jz4740_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
int ret = 0; int ret = 0;
switch (typeReq) { switch (typeReq) {
case SetHubFeature: case SetPortFeature:
if (wValue == USB_PORT_FEAT_POWER) if (wValue == USB_PORT_FEAT_POWER)
ret = ohci_jz4740_set_vbus_power(jz4740_ohci, true); ret = ohci_jz4740_set_vbus_power(jz4740_ohci, true);
break; break;
case ClearHubFeature: case ClearPortFeature:
if (wValue == USB_PORT_FEAT_POWER) if (wValue == USB_PORT_FEAT_POWER)
ret = ohci_jz4740_set_vbus_power(jz4740_ohci, false); ret = ohci_jz4740_set_vbus_power(jz4740_ohci, false);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment