Skip to contentSkip to conversation

patch "usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval" added to usb-linus

PATCH [email protected] 1 participant 1 message Sep 14, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From f0e8a206a2a53a919e1709c654cb65d519f7befb Mon Sep 17 00:00:00 2001
From: Jack Pham <[email protected]>
Date: Thu, 9 Sep 2021 10:48:11 -0700
Subject: usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval

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 <[email protected]>
---
 drivers/usb/gadget/function/f_uac2.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/gadget/function/f_uac2.c +3 -0
index d89c1ebb07f4..be864560bfea 100644
@@ -1178,6 +1178,9 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
 	agdev->out_ep_maxpsize = max_t(u16, agdev->out_ep_maxpsize,
 				le16_to_cpu(ss_epout_desc.wMaxPacketSize));
 
+	ss_epin_desc_comp.wBytesPerInterval = ss_epin_desc.wMaxPacketSize;
+	ss_epout_desc_comp.wBytesPerInterval = ss_epout_desc.wMaxPacketSize;
+
 	// HS and SS endpoint addresses are copied from autoconfigured FS descriptors
 	hs_ep_int_desc.bEndpointAddress = fs_ep_int_desc.bEndpointAddress;
 	hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress;
Signature · 1 line
2.33.0