Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: gadget: f_hid: fix SuperSpeed descriptors

When adding dynamic configuration for bInterval, the value was removed
from the static SuperSpeed endpoint descriptors but was not set from the
configured value in hidg_bind(). Thus at SuperSpeed the interrupt
endpoints have bInterval as zero which is not valid per the USB
specification.

Add the missing setting for SuperSpeed endpoints.

Fixes: ea34925f5b2ee ("usb: gadget: hid: allow dynamic interval configuration via configfs")
Cc: stable <stable@kernel.org>
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://patch.msgid.link/20260227111540.431521-1-jkeeping@inmusicbrands.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

John Keeping and committed by
Greg Kroah-Hartman
7f58b414 9f6a983c

+4
+4
drivers/usb/gadget/function/f_hid.c
··· 1207 1207 if (!hidg->interval_user_set) { 1208 1208 hidg_fs_in_ep_desc.bInterval = 10; 1209 1209 hidg_hs_in_ep_desc.bInterval = 4; 1210 + hidg_ss_in_ep_desc.bInterval = 4; 1210 1211 } else { 1211 1212 hidg_fs_in_ep_desc.bInterval = hidg->interval; 1212 1213 hidg_hs_in_ep_desc.bInterval = hidg->interval; 1214 + hidg_ss_in_ep_desc.bInterval = hidg->interval; 1213 1215 } 1214 1216 1215 1217 hidg_ss_out_comp_desc.wBytesPerInterval = ··· 1241 1239 if (!hidg->interval_user_set) { 1242 1240 hidg_fs_out_ep_desc.bInterval = 10; 1243 1241 hidg_hs_out_ep_desc.bInterval = 4; 1242 + hidg_ss_out_ep_desc.bInterval = 4; 1244 1243 } else { 1245 1244 hidg_fs_out_ep_desc.bInterval = hidg->interval; 1246 1245 hidg_hs_out_ep_desc.bInterval = hidg->interval; 1246 + hidg_ss_out_ep_desc.bInterval = hidg->interval; 1247 1247 } 1248 1248 status = usb_assign_descriptors(f, 1249 1249 hidg_fs_descriptors_intout,