tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB autoconf rework, updated patches said:
> do you have intent to modify ugen(4) to attach to single interfaces? 

Yes, the idea is to have it run in a restricted mode then:
If a driver is already attached to some of the interfaces,
"set configuration" is not allowed, controlled by the
"sc_configlock" already present in the patch. Only endpoints
not belonging to a claimed interface may be opened.
(libusb, which is supposedly the most important ugen client,
has a "claim interface" call which is a no-op on *BSD now.
We might add an ioctl to implement that - it would improve
the bookkeeping.)
The other way: if a new (loaded) driver gets attached, it
(or more precisely the centralized code in udev) can claim
unused interfaces from ugen. If the last one is gone, ugen
gets detached. (Actually, one could as well attach an ugen
instance to every USB device, with zero privileges if all
interfaces are claimed by drivers, but that would be too
much bloat for my taste.)

For the interface accounting to work correctly, the drivers
which attach to a single interface but use others behind
the framework's back need to be converted. uaudio is done
in the patch, what remains are the "CDC" (ethernet/modem)
drivers. Since I don't have any such device, it is not
practical to do in a private tree - it would have to
be committed first.

best regards

Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt

Home | Main Index | Thread Index | Old Index