aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fhci-hub.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2015-01-11 17:47:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 07:48:28 -0500
commit368fbc34c4602accd1ba76d03b4cce07c9c90cf7 (patch)
tree5bf0622ee5a9c29018379a4c1b5456a41b8e49f1 /drivers/usb/host/fhci-hub.c
parent3eb598ded1cfb0dc337d4e82cb274e583856338f (diff)
fhci-hub: no need to overwrite byte 3 of the Hub Descriptor
The code handling Get Hub Descriptor request copies data from root_hub_des[], then overwrites byte 3 with real 'wHubCharacteristics' value. There's no need to overwrite, we can substitute the real value right into root_hub_des[3]. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fhci-hub.c')
-rw-r--r--drivers/usb/host/fhci-hub.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/fhci-hub.c b/drivers/usb/host/fhci-hub.c
index 6af2512f8378..4d061a26b1ad 100644
--- a/drivers/usb/host/fhci-hub.c
+++ b/drivers/usb/host/fhci-hub.c
@@ -32,8 +32,8 @@ static u8 root_hub_des[] = {
32 0x09, /* blength */ 32 0x09, /* blength */
33 0x29, /* bDescriptorType;hub-descriptor */ 33 0x29, /* bDescriptorType;hub-descriptor */
34 0x01, /* bNbrPorts */ 34 0x01, /* bNbrPorts */
35 0x00, /* wHubCharacteristics */ 35 0x11, /* wHubCharacteristics */
36 0x00, 36 0x00, /* per-port power, no overcurrent */
37 0x01, /* bPwrOn2pwrGood;2ms */ 37 0x01, /* bPwrOn2pwrGood;2ms */
38 0x00, /* bHubContrCurrent;0mA */ 38 0x00, /* bHubContrCurrent;0mA */
39 0x00, /* DeviceRemoveable */ 39 0x00, /* DeviceRemoveable */
@@ -272,7 +272,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
272 break; 272 break;
273 case GetHubDescriptor: 273 case GetHubDescriptor:
274 memcpy(buf, root_hub_des, sizeof(root_hub_des)); 274 memcpy(buf, root_hub_des, sizeof(root_hub_des));
275 buf[3] = 0x11; /* per-port power, no ovrcrnt */
276 len = (buf[0] < wLength) ? buf[0] : wLength; 275 len = (buf[0] < wLength) ? buf[0] : wLength;
277 break; 276 break;
278 case GetHubStatus: 277 case GetHubStatus: