Author: hselasky
Date: Fri Jan 18 08:44:50 2019
New Revision: 343132
URL: https://svnweb.freebsd.org/changeset/base/343132

Log:
  MFC r342730:
  Improve USB generic debug messages. Print process ID and name when opening
  and closing usb/ugenX.Y character device nodes.
  
  Sponsored by: Mellanox Technologies

Modified:
  stable/11/sys/dev/usb/usb_generic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/usb_generic.c
==============================================================================
--- stable/11/sys/dev/usb/usb_generic.c Fri Jan 18 08:43:42 2019        
(r343131)
+++ stable/11/sys/dev/usb/usb_generic.c Fri Jan 18 08:44:50 2019        
(r343132)
@@ -181,7 +181,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)) {
@@ -211,7 +212,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 */
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to