usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval
authorJack Pham <jackp@codeaurora.org>
Thu, 9 Sep 2021 17:48:11 +0000 (10:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Sep 2021 08:13:08 +0000 (10:13 +0200)
commitf6fceb4e9ce6af58ddddfb0bad6b52da4f28dfaf
treef08c0ad9767998a1cf1b7226530ca37e40ca0565
parent007574d6ac2642457e908f29c88a417b28e69fa5
usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval

commit f0e8a206a2a53a919e1709c654cb65d519f7befb upstream.

For Isochronous endpoints, the SS companion descriptor's
wBytesPerInterval field is required to reserve bus time in order
to transmit the required payload during the service interval.
If left at 0, the UAC2 function is unable to transact data on its
playback or capture endpoints in SuperSpeed mode.

Since f_uac2 currently does not support any bursting this value can
be exactly equal to the calculated wMaxPacketSize.

Tested with Windows 10 as a host.

Fixes: f8cb3d556be3 ("usb: f_uac2: adds support for SS and SSP")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Link: https://lore.kernel.org/r/20210909174811.12534-3-jackp@codeaurora.org
[jackp: Backport to 5.14 with minor conflict resolution]
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_uac2.c