RE: [linux-usb] Re: USB device allocation

David Waite (mass@ufl.edu)
Tue, 5 Oct 1999 22:33:52 -0400


*grin*

lets have a different interface other than the dev structure( or name them
all like /dev/0, /dev/1, ... /dev/65535), and just have a userspace daemon
watch for device topology changes and create actual links based on
configuration data, i.e. PS/2 mouse becomes /dev/mouse0, USB mouse #1
becomes /dev/mouse1, etc. Just ditch major and minor numbers and the
dev-files altogether.

No major or minor numbers, no real guarantee of order, but a userspace
solution to find the devices when needed.

-David Waite

> -----Original Message-----
> From: Theodore Y. Ts'o [mailto:tytso@mit.edu]
> Sent: Tuesday, October 05, 1999 9:37 PM
> To: Johannes Erdfelt
> Cc: Patrick Schaaf; swetland@be.com; linux-kernel@vger.rutgers.edu;
> linux-usb@suse.com
> Subject: Re: [linux-usb] Re: USB device allocation
>
>
> Date: Tue, 5 Oct 1999 18:19:30 -0400
> From: Johannes Erdfelt <jerdfelt@sventech.com>
>
> As it stands right now, there is no solution for naming of
> Plug and Play
> devices. I'm specifically interested in USB since that's what
> I work on,
> but this applies to everything plug and play (even PCMCIA)
>
> The problem is if you have 2 mice, how do you name? What if they are
> plugged in a different order, now 1 becomes 2 and 2 becomes 1.
>
> How do you differentiate between the 2? This can be difficult in USB
> since in some cases, 2 different mice look identical to the software.
> The only way you can differentiate is based on topology, exactly where
> it's plugged into the bus (which port on which hub).
>
> This is a problem that hasn't been solved yet.
>
> Exactly, and this is why trying to solve the problem in the kernel is
> the wrong way to go. There's enough state that you need to store, and
> policy that may be different on a per-site basis (user and group
> ownership and permissions), the USB topology information, just to name a
> few, that trying to do this in the kernel using a dynamic filesystem is
> madness.
>
> In userspace, a daemon can store in a database information about where
> the mouse is plugged into the USB topology, so that if the user
> designates that mouse #1 is the one plugged into the hub built into
> their monitor (for example), then on subsequent bootups the daemon can
> get this information from the database, and distinguish that mouse from
> the mouse that's plugged in somewhere else into the system.
>
> What other problems will be made easy to solve because of the power and
> flexibility of doing things in user space? The point is that we don't
> know, so we should use the more flexibility solution to solve our
> problem, instead of constraining ourselves with devfs.
>
> The big problem people haven't run into yet and haven't solved is the
> device naming issue.
>
> Naming is hard, no doubt about it. It's Computer Science's original
> rathole. This is why user-visible names (and names in /dev are user
> visible) should be done in userspace. We have much more flexibility,
> and it makes it much easier to Do The Right Thing.
>
> - Ted
>
> --
> To unsubscribe, e-mail: linux-usb-unsubscribe@suse.com
> For additional commands, e-mail: linux-usb-help@suse.com
>

-
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/