]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: midi2: Fix the response for FB info with block 0xff
authorTakashi Iwai <tiwai@suse.de>
Wed, 17 Jul 2024 09:50:53 +0000 (11:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:27 +0000 (15:34 +0200)
commit9f865526d7254420e9831bb1d88be41fcf1727ea
tree94217f01aa886968e1bb8e3dc941d85b7bafc928
parent716cba46f73a92645cf13eded8d257ed48afc2a4
usb: gadget: midi2: Fix the response for FB info with block 0xff

commit 228a953e61d6d608a3facc1c3a27b9fb03c99de7 upstream.

When the block number 0xff is given to Function Block Discovery
message, the device should return the information of all Function
Blocks, but currently the gadget driver treats it as an error.

Implement the proper behavior for the block 0xff instead.

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