On Thu, May 17, 2012 at 10:11:09PM +0800, Andiry Xu wrote: > On 05/17/2012 05:54 AM, Sarah Sharp wrote: > > The BOS descriptor is normally fetched and stored in the usb_device->bos > > during enumeration. USB 3.0 roothubs don't undergo enumeration, but we > > need them to have a BOS descriptor, since each xHCI host has a different > > U1 and U2 exit latency. Make sure to fetch the BOS descriptor for USB > > 3.0 roothubs. It will be freed when the roothub usb_device is released. > > > > Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> > > --- > > drivers/usb/core/hcd.c | 9 +++++++++ > > 1 files changed, 9 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > > index 0cd2daa..7910681 100644 > > --- a/drivers/usb/core/hcd.c > > +++ b/drivers/usb/core/hcd.c > > @@ -997,6 +997,15 @@ static int register_root_hub(struct usb_hcd *hcd) > > dev_name(&usb_dev->dev), retval); > > return (retval < 0) ? retval : -EMSGSIZE; > > } > > + if (usb_dev->speed == USB_SPEED_SUPER) { > > + retval = usb_get_bos_descriptor(usb_dev); > > + if (retval > 0) { > > Why? usb_get_bos_descriptor() returns a negative number if fails. > -ENOMEM, -EINVAL, etc. Ah, good catch, I'll fix that. Sarah Sharp -- 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