On Wed, Aug 17, 2011 at 06:01:36PM +0800, Andiry Xu wrote: > Check device's LPM capability by examining the bmAttibutes field of the > USB2.0 Extension Descriptor. > > Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx> > --- > drivers/usb/core/hub.c | 10 ++++++++-- > include/linux/usb.h | 2 ++ > 2 files changed, 10 insertions(+), 2 deletions(-) > <snip> > diff --git a/include/linux/usb.h b/include/linux/usb.h > index cfd571b..cf13924 100644 > --- a/include/linux/usb.h > +++ b/include/linux/usb.h > @@ -410,6 +410,7 @@ struct usb_tt; > * FIXME -- complete doc > * @authenticated: Crypto authentication passed > * @wusb: device is Wireless USB > + * @lpm_capable: device supports LPM > * @string_langid: language ID for strings > * @product: iProduct string, if present (static) > * @manufacturer: iManufacturer string, if present (static) > @@ -472,6 +473,7 @@ struct usb_device { > unsigned authorized:1; > unsigned authenticated:1; > unsigned wusb:1; > + unsigned lpm_capable:1; Are you planning on reusing this variable for USB 3.0 LPM, or will it be used for USB 2.0 LPM only? If it's only for USB 2.0 LPM, the variable name should probably be usb2_lpm_capable and the comment should change as well. I could see this being used for testing USB 3.0 LPM as well. We might need to run a test in the xHCI driver to catch those USB 3.0 devices that don't implement USB 3.0 LPM. But we'd need to be able to check the device speed in the xHCI driver if we were going to reuse this variable, so that we don't run the USB 2.0 LPM test on a USB 3.0 device. What do you think? 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