Skip to content
Snippets Groups Projects
Commit 220d4966 authored by Jack Pham's avatar Jack Pham Committed by Greg Kroah-Hartman
Browse files

usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus


commit c724417b upstream.

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: eae5820b ("usb: gadget: composite: Write SuperSpeedPlus config descriptors")
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6b0cc7a9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment