diff options
author | Matwey V. Kornilov <matwey@sai.msu.ru> | 2018-11-09 14:03:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-01-16 11:15:11 -0500 |
commit | c1d5fb019f65e1093c77734356f97b6e7ac4d629 (patch) | |
tree | 547851420ab5c4a9d254417f0661336139adae13 /drivers/media/usb/pwc/pwc-if.c | |
parent | 1e0d0a5fd38192f23304ea2fc2b531fea7c74247 (diff) |
media: usb: pwc: Introduce TRACE_EVENTs for pwc_isoc_handler()
There were reports that PWC-based webcams don't work at some
embedded ARM platforms. [1] Isochronous transfer handler seems to
work too long leading to the issues in MUSB USB host subsystem.
Also note, that urb->giveback() handlers are still called with
disabled interrupts. In order to be able to measure performance of
PWC driver, traces are introduced in URB handler section.
[1] https://www.spinics.net/lists/linux-usb/msg165735.html
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/pwc/pwc-if.c')
-rw-r--r-- | drivers/media/usb/pwc/pwc-if.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c index 72704f4d5330..53c111bd5a22 100644 --- a/drivers/media/usb/pwc/pwc-if.c +++ b/drivers/media/usb/pwc/pwc-if.c | |||
@@ -76,6 +76,9 @@ | |||
76 | #include "pwc-dec23.h" | 76 | #include "pwc-dec23.h" |
77 | #include "pwc-dec1.h" | 77 | #include "pwc-dec1.h" |
78 | 78 | ||
79 | #define CREATE_TRACE_POINTS | ||
80 | #include <trace/events/pwc.h> | ||
81 | |||
79 | /* Function prototypes and driver templates */ | 82 | /* Function prototypes and driver templates */ |
80 | 83 | ||
81 | /* hotplug device table support */ | 84 | /* hotplug device table support */ |
@@ -260,6 +263,8 @@ static void pwc_isoc_handler(struct urb *urb) | |||
260 | int i, fst, flen; | 263 | int i, fst, flen; |
261 | unsigned char *iso_buf = NULL; | 264 | unsigned char *iso_buf = NULL; |
262 | 265 | ||
266 | trace_pwc_handler_enter(urb, pdev); | ||
267 | |||
263 | if (urb->status == -ENOENT || urb->status == -ECONNRESET || | 268 | if (urb->status == -ENOENT || urb->status == -ECONNRESET || |
264 | urb->status == -ESHUTDOWN) { | 269 | urb->status == -ESHUTDOWN) { |
265 | PWC_DEBUG_OPEN("URB (%p) unlinked %ssynchronously.\n", | 270 | PWC_DEBUG_OPEN("URB (%p) unlinked %ssynchronously.\n", |
@@ -348,6 +353,8 @@ static void pwc_isoc_handler(struct urb *urb) | |||
348 | } | 353 | } |
349 | 354 | ||
350 | handler_end: | 355 | handler_end: |
356 | trace_pwc_handler_exit(urb, pdev); | ||
357 | |||
351 | i = usb_submit_urb(urb, GFP_ATOMIC); | 358 | i = usb_submit_urb(urb, GFP_ATOMIC); |
352 | if (i != 0) | 359 | if (i != 0) |
353 | PWC_ERROR("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i); | 360 | PWC_ERROR("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i); |