On Wed, Nov 13, 2013 at 10:35:14PM +0800, Huang Rui wrote: > USB 2.1 Link PM adds to use bits[1:15] according to USB 2.0 ECN Errata for > Link Power Management spec. > > Bit Encoding > 0 Reserved > 1 LPM > 2 BESL & Altemate HIRD definitions supported > 3 Recommended Baseline BESL valid > 4 Recommended Deep BESL valid > 11:8 Recommended Baseline BESL value > 15:12 Recommended Deep BESL value > 31:16 Reserved > > So fix the bit mask from 0x1e to 0xfffe. > > Reported-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> > Signed-off-by: Huang Rui <ray.huang@xxxxxxx> Acked-by: Felipe Balbi <balbi@xxxxxx> > --- > drivers/usb/misc/usbtest.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c > index 5ef202b..c6b0f61 100644 > --- a/drivers/usb/misc/usbtest.c > +++ b/drivers/usb/misc/usbtest.c > @@ -655,8 +655,8 @@ static int is_good_ext(struct usbtest_dev *tdev, u8 *buf) > } > > attr = le32_to_cpu(ext->bmAttributes); > - /* bits[1:4] is used and others are reserved */ > - if (attr & ~0x1e) { /* reserved == 0 */ > + /* bits[1:15] is used and others are reserved */ > + if (attr & ~0xfffe) { /* reserved == 0 */ > ERROR(tdev, "reserved bits set\n"); > return 0; > } > -- > 1.7.11.7 > > -- balbi
Attachment:
signature.asc
Description: Digital signature