Re: USB device allocation

Riley Williams (rhw@MemAlpha.CX)
Wed, 6 Oct 1999 12:17:04 +0100 (GMT)


Hi Pavel.

>>> Previous numbers are unusable :-(: their either crash with
>>> existing device, or there's only convient room for one such
>>> device where around 16 are needed.

>> How many really need 16?

> You can have up to 255 devices on each usb bus. There are
> already machines with 3 usb buses.

True, but it also implies that we need 32+ bit node number spaces to
support them, and we don't have that yet...

>> Let's be a bit more reasonable...

> I know I want >32 modems. Creating modem farm is one of valid
> reasons to use usb modems.

I would love to have >32 modems as well, but that would essentially
require a separate major for USB modems to the one used for everything
else.

>> 0 => 31 USB Serial (Mouse or Modem)

> They are not the same. Mouse is much different from modem.

A SERIAL mouse may be different from a modem, but both are serial
devices. However, see my comments later regarding this...

>> 32 => 47 USB Printers
>> 48 => 63 USB Scanners
>> 64 => 79 USB Cameras

> They do not need device numbers.

In that case, neither does /dev/lp[012] need device numbers allocated
to it, and we can get rid of the ones they're occupying.

>> 80 => 95 USB Keyboards

> They do not need device numbers... yet.

See comments below...

>> 96 => 111 USB firmware downloaders
>> 112 => 239 Reserved for future definition
>> 240 => 255 USB Experimental

>> Remember also that the names are reasonably irrelevant, and only
>> the node numbers actually matter.

Regarding the allocations for USB mouse and USB keyboard, the first
thing I would ask is whether there is any real use for more than one
of either. If not, this could be dealt with by simply allocating one
number for each.

However, probably a more realistic idea would be to allocate a range
of major numbers for USB buses, along the lines of the following:

160 Primary USB bus
161 Secondary USB bus
162 Tertiary USB bus
163 Quaternary USB bus
:
175 16th USB bus
:
191 32nd USB bus

Then within each bus, allocate the minors to map to the relevant USB
ID's (presumably the reason for the limit of 255 devices per USB bus),
and implement some means of mapping the two together...

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/Linux/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/