aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2019-01-03 14:27:51 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2019-01-03 14:27:51 +0000
commitfdb955f51fba55728918c44094f5391b3c7367c6 (patch)
treec524577165d8c53009868608c7e23748c3523c0c /sys
parent34ada20958c76aa1f728b7e1dc251e02f53e8bb2 (diff)
downloadsrc-fdb955f51fba55728918c44094f5391b3c7367c6.tar.gz
src-fdb955f51fba55728918c44094f5391b3c7367c6.zip
Improve USB generic debug messages. Print process ID and name when opening
and closing usb/ugenX.Y character device nodes. MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=342730
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb_generic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c
index a6f2f87506a7..2ca44a89a1f5 100644
--- a/sys/dev/usb/usb_generic.c
+++ b/sys/dev/usb/usb_generic.c
@@ -183,7 +183,8 @@ ugen_open(struct usb_fifo *f, int fflags)
struct usb_endpoint_descriptor *ed = ep->edesc;
uint8_t type;
- DPRINTFN(6, "flag=0x%x\n", fflags);
+ DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags,
+ curthread->td_proc->p_pid, curthread->td_proc->p_comm);
mtx_lock(f->priv_mtx);
switch (usbd_get_speed(f->udev)) {
@@ -213,7 +214,9 @@ ugen_open(struct usb_fifo *f, int fflags)
static void
ugen_close(struct usb_fifo *f, int fflags)
{
- DPRINTFN(6, "flag=0x%x\n", fflags);
+
+ DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags,
+ curthread->td_proc->p_pid, curthread->td_proc->p_comm);
/* cleanup */