]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: raw-gadget: do not limit transfer length
authorAndrey Konovalov <andreyknvl@gmail.com>
Tue, 21 Oct 2025 22:25:45 +0000 (00:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:09:00 +0000 (14:09 +0100)
commita8d81c9599f6e2097ce20eaa8402cc0071ba75e3
tree02f5ea78921da5ef9fd60808beb954cc3b99b937
parentd1446a98ca5f74dd7985fbb666b34d99b1c94acd
usb: raw-gadget: do not limit transfer length

commit 37b9dd0d114a0e38c502695e30f55a74fb0c37d0 upstream.

Drop the check on the maximum transfer length in Raw Gadget for both
control and non-control transfers.

Limiting the transfer length causes a problem with emulating USB devices
whose full configuration descriptor exceeds PAGE_SIZE in length.

Overall, there does not appear to be any reason to enforce any kind of
transfer length limit on the Raw Gadget side for either control or
non-control transfers, so let's just drop the related check.

Cc: stable <stable@kernel.org>
Fixes: f2c2e717642c ("usb: gadget: add raw-gadget interface")
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://patch.msgid.link/a6024e8eab679043e9b8a5defdb41c4bda62f02b.1761085528.git.andreyknvl@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/raw_gadget.c