kernel: fix uvc debug patch
This commit is contained in:
parent
48dfe4bae7
commit
d8a7dd5a98
@ -1,7 +1,6 @@
|
|||||||
--- a/drivers/usb/gadget/function/uvc_video.c
|
--- a/drivers/usb/gadget/function/uvc_video.c
|
||||||
+++ b/drivers/usb/gadget/function/uvc_video.c
|
+++ b/drivers/usb/gadget/function/uvc_video.c
|
||||||
@@
|
@@ -763,12 +763,44 @@
|
||||||
int uvcg_video_enable(struct uvc_video *video)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -22,26 +21,27 @@
|
|||||||
"Video enable failed, device is uninitialized.\n");
|
"Video enable failed, device is uninitialized.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
+
|
|
||||||
+ if (!video->kworker || !video->async_wq) {
|
+ if (!video->kworker || !video->async_wq) {
|
||||||
+ uvcg_err(&video->uvc->func,
|
+ uvcg_err(&video->uvc->func,
|
||||||
+ "Video enable failed, missing worker(s) kworker=%p async_wq=%p\n",
|
+ "Video enable failed, missing worker(s) kworker=%p async_wq=%p\n",
|
||||||
+ video->kworker, video->async_wq);
|
+ video->kworker, video->async_wq);
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!video->queue.queue.dev) {
|
+ if (!video->queue.queue.dev) {
|
||||||
+ uvcg_err(&video->uvc->func,
|
+ uvcg_err(&video->uvc->func,
|
||||||
+ "Video enable failed, missing queue device\n");
|
+ "Video enable failed, missing queue device\n");
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ uvcg_info(&video->uvc->func,
|
+ uvcg_info(&video->uvc->func,
|
||||||
+ "Video enable start: video=%p ep=%p kworker=%p async_wq=%p req_size=%u max_payload=%u requests=%u reqs_per_frame=%u use_sg=%u flags=0x%x\n",
|
+ "Video enable start: video=%p ep=%p kworker=%p async_wq=%p req_size=%u max_payload=%u requests=%u reqs_per_frame=%u use_sg=%u flags=0x%x\n",
|
||||||
+ video, video->ep, video->kworker, video->async_wq,
|
+ video, video->ep, video->kworker, video->async_wq,
|
||||||
+ video->req_size, video->max_payload_size,
|
+ video->req_size, video->max_payload_size,
|
||||||
+ video->uvc_num_requests, video->reqs_per_frame,
|
+ video->uvc_num_requests, video->reqs_per_frame,
|
||||||
+ video->queue.use_sg, video->queue.flags);
|
+ video->queue.use_sg, video->queue.flags);
|
||||||
|
+
|
||||||
/*
|
/*
|
||||||
* Safe to access request related fields without req_lock because
|
* Safe to access request related fields without req_lock because
|
||||||
|
* this is the only thread currently active, and no other
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user