> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Alexandra Yates > Sent: Friday, August 09, 2013 12:21 PM Hi Alexandra, <snip> > > +/* USB 2.0 BOS descriptor and a capability descriptor, combined */ > +static u8 usb2_bos_descriptor[] = { > + USB_DT_BOS_SIZE, /* __u8 bLength, 5 bytes */ > + USB_DT_BOS, /* __u8 bDescriptorType */ > + 0x0c, 0x00, /* __le16 wTotalLength, 15 bytes */ > + 0x1, /* __u8 bNumDeviceCaps */ > + /* First device capability */ > + USB_DT_USB_EXT_CAP_SIZE, /* 7 bits USB2 ext */ > + USB_DT_DEVICE_CAPABILITY, /* Device Capability */ > + USB_CAP_TYPE_EXT, /* DevCapability Type, USB2.0 ext */ > + 0x1e, /* bmAttributes first byte: bit1:LPM > + Supported, bit2: BESL supported, > + bit3:valid baseline BESL, bit4: > + valid Deep BESL, bits5-7 */ Here you hard-code the first byte of bmAttributes, so LPM Supported, BESL Supported etc. are already set... > + 0xff, /* bmAttributes - second byte: > + 8-11bit:BESL and 12-16bit:DBESL*/ > + 0x00, /* bmAttribute - third byte: reserved, > + must be zero */ > + 0x00, /* bmAttribute - fourth byte: reserved, > + must be zero */ > +}; > + > > static void xhci_common_hub_descriptor(struct xhci_hcd *xhci, > struct usb_hub_descriptor *desc, int ports) > @@ -577,12 +599,33 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, > if ((wValue & 0xff00) != (USB_DT_BOS << 8)) > goto error; > > - if (hcd->speed != HCD_USB3) > + if (hcd->speed == HCD_USB3) { > + /* Set the U1 and U2 exit latencies. */ > + memcpy(buf, &usb3_bos_descriptor, > + USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE); > + } else if (hcd ->speed == HCD_USB2) { > + memcpy(buf, &usb2_bos_descriptor, > + USB_DT_BOS_SIZE + USB_DT_USB_EXT_CAP_SIZE); > + > + /* Set first byte of bmAttributes in the > + * usb2_bos_descriptor */ > + if (xhci->hw_lpm_support) > + buf[8] |= USB_LPM_SUPPORT; ...so these two lines have no effect, the bit is already set. > + /* Set the BESL support bit in bmAttributes first > + * byte */ > + if (XHCI_BLC) > + buf[8] |= USB_BESL_SUPPORT; Ditto here. Or am I misunderstanding something? -- Paul -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html