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>
Mon, 28 Dec 2020 14:56:22 +0000 (15:56 +0100)
commit9389044f27081d6ec77730c36d5bf9a1288bcda2
treed24ad5f512cf3de152fe330abb589166ec679e41
parente5f4ca3fce90a37b23a77bfcc86800d484a80514
usb: gadget: f_uac2: reset wMaxPacketSize

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