BlackBerry (Re: using libusb)

Hans Petter Selasky hselasky at c2i.net
Fri Jan 11 10:10:01 PST 2008


On Friday 11 January 2008, Marcin Cieslak wrote:
> Duane H Hesser wrote:
> >> The only work-around is to not have umass, etcetera in your kernel,
> >> but that sucks, because one may want to be able to access /some/
> >> devices as mass-storage, and some others as merely generics...
> >
> > A similar problem occurs to many of us who have HP printers which
> > hook up (quite properly, it seems to me) on ulpt0.  Mine also
> > hooks up on umass0 (to service the flash memory card slots),
> > and would hook up on uscanner0, too, if uscanner.c were modified
> > to  recognize it.  If we want to use HP's software (HPLIP)
> > to drive the printer we must arrange arrange for it to be ugen.
>
> Maybe we should move to the model where we attach drivers to interfaces
> or even particular endpoints?  What about sharing the control endpoint?

Hi,

The control endpoint is already shared and we do already support per interface 
driver attach. What is missing is some glue between userland and the USB 
kernel.

Extending my previous idea:

/dev/usb<bus_no>.<dev_no>.<iface_no>.<ep_no>

If the iface is 255 then the iface number is ignored, and we are opening a raw 
endpoint. Only the super user is allowed to do this.

Else the rule becomes that endpoints on an interface can only be opened when 
no other kernel driver is attached to that particular interface, unless you 
are super user.

What do you think ?

--HPS


More information about the freebsd-usb mailing list