Re: USB drivers

From: Bernd Walter <ticso_at_cicely12.cicely.de>
Date: Wed, 4 Aug 2004 17:07:39 +0200
On Wed, Aug 04, 2004 at 10:41:50AM -0400, Chris wrote:
> The last time I programed was over 15 years ago and I was thinking of 
> looking into the USB drivers for FreeBSD concerning multifunction 
> devices. If I ask stupid questions forgive me because I am seeing this 
> as a user.
> 
> First I would like to know if there is a technical reason why two 
> different divers cannot attach to the same device. If each driver works 
> well independently, what is the reason to prevent the second one from 
> attaching? I would assume that if you attempted to use both drivers at 
> the same time you would get a device busy error.

USB devices can be designed to have multiple interfaces at which you
can have different drivers - e.g. you can have a ulpt/umass combo
and both drivers just clain the according interface from the same
device.
Therefor also drivers can be programmed for whole USB devices and for
USB subdevices.
This works perfectly with FreeBSD.

> Am I misunderstanding something here? I see ulpt: and unlpt: attaching 
> to the same device and the choice of which one to use is up to the user 
> and the hardware they have. If we have two drivers attach in one case 
> why, and where, do we prevent other drivers from attaching if they meet 
> the minimum requirements?

unlpt and ulpt are just different representations from the same driver.
There is absolutely no sense in having two clients printing at the same
time on the same printer, so blocking each other is absolutely reasonable.
Scheduling multiple requests is up to software like lpd.
See ulpt(4) for details about the functional difference in ulpt vs. unlpt
device nodes - depending on the printer you will likely end up in always
using the same devicenode.
Why do you think this is wrong?

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd_at_bwct.de                                  info_at_bwct.de
Received on Wed Aug 04 2004 - 13:08:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC