lkml.org 
[lkml]   [1999]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb] Re: USB device allocation
danielt@digi.com wrote:

> > > > I have 2 modems, I plug modem A in first, it becomes (hypothetical)
> > > > device /dev/modem1. I plug in modem B second, it becomes /dev/modem2.
> > > >
> > > > Now, I unplug both and plug modem B in first, it becomes modem1 now with
> > > > the current naming system.
> > > >
> > > > This is completely unacceptable.
> > > >
> > > > Does devfs solve this problem right now? No. Will it be easy to solve
> > > > this problem with devfs when an appropriate algorithm to name PnP
> > > > devices is created. Yes.

the above is trivially easy. an in core map can be kept of what cookie goes in what
jar. on shutdown, that map is flushed to the appropriate file.

this is the same approach taken for quotas and has been requested for network
routing/config/firewall, etc.


> Using devfs you would register by name for clearly identified
> devices, by serial number for unknown devices having serial
> numbers and by topology for completely unknown devices.
>
> The USB driver has to provide the names, devfs does not
> set policy, it only provides a mechanism.

and neatly allows users to manage policy in userland where policy should be dictated.



> Daemon: select on /dev/USB/status
> Driver: Hey! I just registered /dev/USB/213987rywsl!
> Daemon: What's that? I better ask my user what that is!

reference above in core map. if it was used before, it can be plopped into the right
place automatically. if not, config policy dictates the next slot to fill, or to
request the user to advise.

all in all, it seems that this scheme makes things wonderfully managable and usable.
i can now plug/unplug a particular usb mouse and plug it back in in any other port
and have it come back as it's supposed to. truely transparent for users. should
policy place something in jar A and the user wants it in jar B, they can (warning!
GUI enhanced example!) pop up their little management interface and drag it from jar
A to jar B and the in core mapping is updated appropriately.

-d

--
This is Linux Country. On a quiet night, you can hear Windows NT reboot!
Do you remember how to -think- ? Do you remember how to experiment? Linux
__ is an operating system that brings back the fun and adventure in computing.
\/ for linux-kernel: please read linux/Documentation/* before posting problems




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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.101 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site