Messages in this thread | | | Date | Tue, 5 Oct 1999 21:36:42 -0400 | From | "Theodore Y. Ts'o" <> | 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 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/
| |