USB stack getting confused

Hans Petter Selasky hps at selasky.org
Sat Mar 9 21:40:29 UTC 2019


On 3/9/19 8:28 PM, Rozhuk Ivan wrote:
> On Sat, 9 Mar 2019 18:26:40 +0200
> Konstantin Belousov <kostikbel at gmail.com> wrote:
> 
>> In fact I saw something similar with apcupsd and either usb/com
>> adapters or native usb control card for APC UPSes.  For reasons I do
>> not understand, these devices are often disconnected.  For older
>> versions of apcupsd, it required restart for newly reattached device
>> to be recreated in /dev. Sometimes it hangs whole usb stack.
>>
>> Newer apcupsd seems to open /dev/ugen only for the duration of the
>> query, which makes the erratic behaviour is much less likely, but
>> could still cause breakage when device disappear while apcupsd has it
>> opened.
>>
> 
> Same problem with usb sound cards.
> I try to fix it, but fail with dsp, only mixer can be fixed with small code change.
> https://reviews.freebsd.org/D11140
> 

Hi,

How will these apps detect that they need to open the new /dev/mixer node?

I mean, after hang is fixed, mixer app will still try to query the old 
file handle forever?

--HPS


More information about the freebsd-hackers mailing list