r342378: usbconfig takes 3-5 minutes to read the bus
Hans Petter Selasky
hps at selasky.org
Thu Jan 3 12:52:58 UTC 2019
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 at 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
More information about the freebsd-usb
mailing list