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>
This commit is contained in:
William Wu
2021-05-07 11:30:58 +08:00
committed by Tao Huang
parent 3e41649e10
commit 3b07017b96

View File

@@ -858,9 +858,13 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
uvc_ss_bulk_streaming_ep.wMaxPacketSize =
cpu_to_le16(max_packet_size);
uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst;
uvc_ss_streaming_comp.wBytesPerInterval =
cpu_to_le16(max_packet_size * opts->streaming_maxburst);
uvc_ss_bulk_streaming_comp.bMaxBurst = opts->streaming_maxburst;
/*
* As per USB 3.1 spec "Table 9-26. SuperSpeed Endpoint
* Companion Descriptor", the wBytesPerInterval must be
* set to zero for bulk endpoints.
*/
uvc_ss_bulk_streaming_comp.wBytesPerInterval = 0;
}
/* Allocate endpoints. */