Date: Thu, 3 Jan 2019 11:03:26 +0100 From: Hans Petter Selasky <hps@selasky.org> To: freebsd-usb@freebsd.org Subject: Re: r342378: usbconfig takes 3-5 minutes to read the bus Message-ID: <076e01a2-51e7-b140-28c9-1c58d034327b@selasky.org> In-Reply-To: <20190103094850.GA2595@c720-r342378> References: <20190101135156.GA3557@c720-r342378> <3ac801b2-899a-ee09-1398-ecab6ec7130a@selasky.org> <20190102104853.GA2622@c720-r342378> <4bf80067-8e3a-572f-c1b5-ae83b1c40c22@selasky.org> <20190102154701.GA13702@c720-r342378> <2f013cf9-b073-04fd-9932-079f86fa24b1@selasky.org> <d0f569af-342f-dac8-8f6d-4fc0ff21924e@selasky.org> <20190103060431.GA2711@c720-r342378> <5950d771-ffa9-9325-b102-295fd092052e@selasky.org> <20190103094850.GA2595@c720-r342378>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/3/19 10:48 AM, Matthias Apitz wrote:
> Is there a way log log any init call to libusb.so to see which process
> is doing something with libusb.so after devd(8) started pcscd?
Hi,
You can add a print in the kernel sys/dev/usb/usb_generic.c in the function:
static int
ugen_open(struct usb_fifo *f, int fflags)
printf("USB opened by PID %d %s\n", curthread->td_proc->p_pid,
curthread->td_proc->p_comm);
> Index: sys/dev/usb/usb_generic.c
> ===================================================================
> --- sys/dev/usb/usb_generic.c (revision 342455)
> +++ sys/dev/usb/usb_generic.c (working copy)
> @@ -185,6 +185,8 @@
>
> DPRINTFN(6, "flag=0x%x\n", fflags);
>
> + printf("USB opened by PID %d %s\n", curthread->td_proc->p_pid, curthread->td_proc->p_comm);
> +
> mtx_lock(f->priv_mtx);
> switch (usbd_get_speed(f->udev)) {
> case USB_SPEED_LOW:
--HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?076e01a2-51e7-b140-28c9-1c58d034327b>
