Skip to content

Commit a55a8e9

Browse files
committed
usb: gadget: f_uvc: fix the superspeed ep companion descriptor
As per USB 3.1 spec "Table 9-26. SuperSpeed Endpoint Companion Descriptor", the wBytesPerInterval must be set to zero for bulk endpoints. Change-Id: I2ec14ac0b0db1f4b5dc3bdbb61e3d2c02c63da23 Signed-off-by: William Wu <william.wu@rock-chips.com>
1 parent 8b6abf1 commit a55a8e9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/usb/gadget/function/f_uvc.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,9 +811,13 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
811811

812812
uvc_ss_bulk_streaming_ep.wMaxPacketSize =
813813
cpu_to_le16(max_packet_size);
814-
uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst;
815-
uvc_ss_streaming_comp.wBytesPerInterval =
816-
cpu_to_le16(max_packet_size * opts->streaming_maxburst);
814+
uvc_ss_bulk_streaming_comp.bMaxBurst = opts->streaming_maxburst;
815+
/*
816+
* As per USB 3.1 spec "Table 9-26. SuperSpeed Endpoint
817+
* Companion Descriptor", the wBytesPerInterval must be
818+
* set to zero for bulk endpoints.
819+
*/
820+
uvc_ss_bulk_streaming_comp.wBytesPerInterval = 0;
817821
}
818822

819823
/* Allocate endpoints. */

0 commit comments

Comments
 (0)