提交 875bc23a 编写于 作者: H Huang Rui 提交者: Greg Kroah-Hartman

usb: usbtest: fix the bit mask of usb 2.0 extension descriptor

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: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: NHuang Rui <ray.huang@amd.com>
Acked-by: NFelipe Balbi <balbi@ti.com>
Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c952a8ba
...@@ -619,8 +619,8 @@ static int is_good_ext(struct usbtest_dev *tdev, u8 *buf) ...@@ -619,8 +619,8 @@ static int is_good_ext(struct usbtest_dev *tdev, u8 *buf)
} }
attr = le32_to_cpu(ext->bmAttributes); attr = le32_to_cpu(ext->bmAttributes);
/* bits[1:4] is used and others are reserved */ /* bits[1:15] is used and others are reserved */
if (attr & ~0x1e) { /* reserved == 0 */ if (attr & ~0xfffe) { /* reserved == 0 */
ERROR(tdev, "reserved bits set\n"); ERROR(tdev, "reserved bits set\n");
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册