kernel: log uvc prep ep state

This commit is contained in:
Brad Stein 2026-01-26 22:32:54 -03:00
parent 2fa996ed61
commit c7b06c4456

View File

@ -1,6 +1,6 @@
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -503,9 +503,17 @@
@@ -503,9 +503,22 @@
unsigned int max_req_size, req_size, header_size;
unsigned int nreq;
@ -10,6 +10,11 @@
+
max_req_size = video->max_req_size;
+ uvcg_info(&uvc->func,
+ "Video prep ep: ep=%p desc=%p maxpacket=%u maxburst=%u mult=%u\n",
+ video->ep, video->ep->desc, video->ep->maxpacket,
+ video->ep->maxburst, video->ep->mult);
+
if (!usb_endpoint_xfer_isoc(video->ep->desc)) {
+ uvcg_info(&uvc->func,
+ "Video prep non-isoc: attrs=0x%x max_req=%u imagesize=%u interval=%u\n",
@ -18,7 +23,7 @@
video->req_size = max_req_size;
video->reqs_per_frame = video->uvc_num_requests =
DIV_ROUND_UP(video->imagesize, max_req_size);
@@ -534,6 +542,16 @@
@@ -534,6 +547,16 @@
}
video->req_size = req_size;
@ -35,7 +40,7 @@
/* We need to compensate the amount of requests to be
* allocated with the maximum amount of zero length requests.
* Since it is possible that hw_submit will initially
@@ -558,6 +576,11 @@
@@ -558,6 +581,11 @@
*/
uvc_video_prep_requests(video);
@ -47,7 +52,7 @@
for (i = 0; i < video->uvc_num_requests; i++) {
ureq = kzalloc(sizeof(struct uvc_request), GFP_KERNEL);
if (ureq == NULL)
@@ -764,20 +787,70 @@
@@ -764,20 +792,70 @@
{
int ret;