]> git.hungrycats.org Git - linux/commit
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Jul 2024 09:57:17 +0000 (11:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Jul 2024 09:36:15 +0000 (11:36 +0200)
commit0c777978498fb9fa7c41684a3d1c810ebcb9248b
treec196380392d65ff5efc739a6bdacd159e011de10
parent82c94e6a7bd116724738aa67eba6f5fedf3a3319
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup

commit 3eb27d3e32c78badbc4db6ae76614b5961e32291 upstream.

The MIDI2 gadget driver handled the default MIDI protocol version
incorrectly due to the confusion of the protocol version passed via
configfs (either 1 or 2) and UMP protocol bits (0x100 / 0x200).
As a consequence, the default protocol always resulted in MIDI1.

This patch addresses the misunderstanding of the protocol handling.

Fixes: 29ee7a4dddd5 ("usb: gadget: midi2: Add configfs support")
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240708095719.25627-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_midi2.c