]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: midi2: Fix MIDI2 IN EP max packet size
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Sep 2025 13:32:34 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:37:39 +0000 (16:37 +0200)
commit0ab708a2f145d4a5718b6d15a9541350526e6d0c
tree1e0663fd30ce41fdd2975d3844d7e54aae4f5ea2
parentab8c7c4d8f1ebb2a9bf55a7fc07d9f85643d54ea
usb: gadget: midi2: Fix MIDI2 IN EP max packet size

commit 116e79c679a1530cf833d0ff3007061d7a716bd9 upstream.

The EP-IN of MIDI2 (altset 1) wasn't initialized in
f_midi2_create_usb_configs() as it's an INT EP unlike others BULK
EPs.  But this leaves rather the max packet size unchanged no matter
which speed is used, resulting in the very slow access.
And the wMaxPacketSize values set there look legit for INT EPs, so
let's initialize the MIDI2 EP-IN there for achieving the equivalent
speed as well.

Fixes: 8b645922b223 ("usb: gadget: Add support for USB MIDI 2.0 function driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20250905133240.20966-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_midi2.c