usb: gadget: composite: fill bcdUSB for any gadget max speed
authorIgor Kotrasinski <i.kotrasinsk@samsung.com>
Thu, 20 Aug 2015 08:00:01 +0000 (10:00 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 31 Mar 2016 07:59:39 +0000 (16:59 +0900)
commitb2dc4ebd4d223980b4d047d2f04d497fbb2b2c9c
tree7080154a6c97da38a8d8e850ac66970de1267fbb
parent687fe647d9dfc62ca2599b93b414ac0cc214d332
usb: gadget: composite: fill bcdUSB for any gadget max speed

When handling device GET_DESCRIPTOR, composite gadget driver fills
the bcdUSB field only if the gadget supports USB 3.0. Otherwise
the field is left unfilled.

For consistency, set bcdUSB to 0x0200 for gadgets that don't
support superspeed.

It's correct to use 0x0200 for any setting that doesn't use
superspeed, since USB 2.0 devices can restrict themselves to
full speed only. It is NOT correct to use 0x0210, since BOS
descriptors are handled only if gadget_is_superspeed() is
satisfied, otherwise it results in a stall.

Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[Backported from mainline commit
5527e73305e8a9958b00331902a27514e62d539b]
Change-Id: Icd543a5b83c6b915be4ba54343ce979145f7e15d
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
drivers/usb/gadget/composite.c