]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_uac2: reset wMaxPacketSize
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 21 Dec 2020 17:35:28 +0000 (18:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:10:22 +0000 (20:10 +0100)
commit922f7e5cce418046ed2091ed6054be2dbc3e31db
tree989bab609cbb54ea2cb60fcc2a5962f0d428c4b2
parent0e7e08f76e45467fbc958546d37415cd17bd40a7
usb: gadget: f_uac2: reset wMaxPacketSize

commit 9389044f27081d6ec77730c36d5bf9a1288bcda2 upstream.

With commit 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth")
wMaxPacketSize is computed dynamically but the value is never reset.

Because of this, the actual maximum packet size can only decrease each time
the audio gadget is instantiated.

Reset the endpoint maximum packet size and mark wMaxPacketSize as dynamic
to solve the problem.

Fixes: 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201221173531.215169-2-jbrunet@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_uac2.c