Logging communication with devices
Peter Senna Tschudin
peter.senna at gmail.com
Sun Oct 4 07:18:29 EDT 2015
Does Linux provide an elegant and/or standard way of logging
communication with devices that manage buffers and that can help me
improve code like:
$ cat drivers/usb/host/fotg210-hcd.c
...
temp = snprintf(next, size,
"\n\t%p%c%s len=%d %08x urb %p",
td, mark, ({ char *tmp;
switch ((scratch>>8)&0x03) {
case 0:
tmp = "out";
break;
case 1:
tmp = "in";
break;
case 2:
tmp = "setup";
break;
default:
tmp = "?";
break;
} tmp; }),
(scratch >> 16) & 0x7fff,
scratch,
td->urb);
--
Peter
More information about the Kernelnewbies
mailing list