Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2019 13:50:36 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Ludovic Rousseau <ludovic.rousseau@gmail.com>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: r342378: usbconfig takes 3-5 minutes to read the bus
Message-ID:  <4ad0bb5d-aa55-fdc0-e801-3d42b60e14e1@selasky.org>
In-Reply-To: <CAGstE8B6RxBqBG9uqUXc60JcsB6=-QcmN1Q4kTgbgwoWGVaNyA@mail.gmail.com>
References:  <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> <076e01a2-51e7-b140-28c9-1c58d034327b@selasky.org> <20190103113512.GA2547@c720-r342378> <34dfc02b-b252-9f38-a905-31a713012c6a@selasky.org> <CAGstE8B6RxBqBG9uqUXc60JcsB6=-QcmN1Q4kTgbgwoWGVaNyA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/3/19 1:36 PM, Ludovic Rousseau wrote:
> I hope this email will go to freebsd-usb@ since I am not a member of this list.
> 
> Le jeu. 3 janv. 2019 à 13:19, Hans Petter Selasky <hps@selasky.org> a écrit :
>>
>> On 1/3/19 12:35 PM, Matthias Apitz wrote:
>>> but is doing so 3000++ times:
>>>
>>> $ dmesg | grep 'PID 544' | wc -l
>>>       3441
>>>
>>> This proc is started by devd(8)  with that devd(8) hook:
>>>
>>
>> Hi,
>>
>> Basically pcscd is congesting the enumeration SX lock, preventing
>> usbconfig from running because it tries to open the same USB device over
>> and over again. I'm not sure why, but it can have something to do with
>> how you start pcscd.
>>
>> Can you try to use the example rules given by the pcscd packet message?
>>
>> attach 100 {
>>           device-name "ugen[0-9]+";
>>           action "/usr/local/sbin/pcscd -H";
>> };
>>
>> detach 100 {
>>           device-name "ugen[0-9]+";
>>           action "/usr/local/sbin/pcscd -H";
>> };
>>
>> Maybe there is a bug in pcsd that it tries to open the same USB device
>> over and over again if there is an libusb error? Maybe it should sleep a
>> bit before trying to re-enumerate devices?
>>
>> I'm CC'ing Ludovic Rousseau, in case he has any comments.
> 

Hi Matthias,

Can you try this:

> You can enable pcscd hotplug debug by editing DEBUG_HOTPLUG at
> https://salsa.debian.org/rousseau/PCSC/blob/master/src/hotplug_libusb.c#L69
> 
> A pcscd trace would be helpful. See https://pcsclite.apdu.fr/#support
> 

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ad0bb5d-aa55-fdc0-e801-3d42b60e14e1>