]> git.ipfire.org Git - thirdparty/u-boot.git/commit
usb: composite: Fix max packet size for USB3.0
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Thu, 13 Dec 2018 09:46:36 +0000 (15:16 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 9 Jan 2019 10:17:46 +0000 (11:17 +0100)
commit50279538e6c02d9be689989723c13105533517b4
tree94500c2ff071586e537bd719660072d48172fdfe
parentbacc855c612bef8be7e9a7e891727233687500b6
usb: composite: Fix max packet size for USB3.0

For USB3.0, the max packetsize for GET_DESCRIPTOR should be
sent as exponent value for 2. This means for 512, max packet
size should be filled with 9(2^9=512). Also, fill the USB
version field with 3.0 if speed is negotiated to Superspeed.
This fixes the issue of DFU gadget download failure with
superspeed. Without this patch, the max packet size is
overflowed to zero as the bMaxPacketsize is of u8 and hence
host is not able to detect this device.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/usb/gadget/composite.c