]> 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:16:20 +0000 (20:16 +0100)
commit692ab0726460367cb293867f31a1cdd1e5f56d1a
tree98df585af562825d5a8d9569bcda6e4dc813856a
parent7ac84fa85ba20a274aeeff9e497275a9f08fbabf
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