mirror of
https://github.com/torvalds/linux
synced 2024-10-22 19:25:51 +00:00
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>
This commit is contained in:
parent
3eb598ded1
commit
368fbc34c4
|
@ -32,8 +32,8 @@ static u8 root_hub_des[] = {
|
||||||
0x09, /* blength */
|
0x09, /* blength */
|
||||||
0x29, /* bDescriptorType;hub-descriptor */
|
0x29, /* bDescriptorType;hub-descriptor */
|
||||||
0x01, /* bNbrPorts */
|
0x01, /* bNbrPorts */
|
||||||
0x00, /* wHubCharacteristics */
|
0x11, /* wHubCharacteristics */
|
||||||
0x00,
|
0x00, /* per-port power, no overcurrent */
|
||||||
0x01, /* bPwrOn2pwrGood;2ms */
|
0x01, /* bPwrOn2pwrGood;2ms */
|
||||||
0x00, /* bHubContrCurrent;0mA */
|
0x00, /* bHubContrCurrent;0mA */
|
||||||
0x00, /* DeviceRemoveable */
|
0x00, /* DeviceRemoveable */
|
||||||
|
@ -272,7 +272,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||||
break;
|
break;
|
||||||
case GetHubDescriptor:
|
case GetHubDescriptor:
|
||||||
memcpy(buf, root_hub_des, sizeof(root_hub_des));
|
memcpy(buf, root_hub_des, sizeof(root_hub_des));
|
||||||
buf[3] = 0x11; /* per-port power, no ovrcrnt */
|
|
||||||
len = (buf[0] < wLength) ? buf[0] : wLength;
|
len = (buf[0] < wLength) ? buf[0] : wLength;
|
||||||
break;
|
break;
|
||||||
case GetHubStatus:
|
case GetHubStatus:
|
||||||
|
|
Loading…
Reference in a new issue