Jack Pham c724417baf usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus
SuperSpeedPlus peripherals must report their bMaxPower of the
configuration descriptor in units of 8mA as per the USB 3.2
specification. The current switch statement in encode_bMaxPower()
only checks for USB_SPEED_SUPER but not USB_SPEED_SUPER_PLUS so
the latter falls back to USB 2.0 encoding which uses 2mA units.
Replace the switch with a simple if/else.

Fixes: eae5820b852f ("usb: gadget: composite: Write SuperSpeedPlus config descriptors")
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-02-11 08:45:45 +02:00
..
2019-12-14 12:40:39 -08:00
2019-10-14 07:09:59 +02:00
2019-11-04 06:41:09 +01:00
2020-01-17 07:52:26 +01:00
2019-09-03 19:00:39 +02:00
2019-09-02 19:20:57 +02:00