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

Matthew Dharm (mdharm@one-eyed-alien.net)
Tue, 5 Oct 1999 17:15:20 -0700 (PDT)


On Tue, 5 Oct 1999, H. Peter Anvin wrote:

> David Weinehall wrote:
> >
> > On Tue, 5 Oct 1999, H. Peter Anvin wrote:
> >
> > > David Weinehall wrote:
> > > >
> > > > > That is one way of doing it; IMO a very good way because it lets you
> > > > > have policy in user space.
> > > >
> > > > Oh? And what kind of image of how devfs does things do you have then?
> > > >
> > > > This is how devfs works. The kernel part of devfs informs devfsd of the
> > > > changes (what devices need to be created/removed), and devfsd nicely
> > > > carries out its chores. User-space policy and persistent access-rights are
> > > > there for you.
> > > >
> > >
> > > ... in which case you don't need devfs at all.
> >
> > And how will you inform the daemon that new devices need to be
> > created/removed?
> >
>
> By a pipe or socket. Doing it via a filesystem is broken anyway, since
> you need a message -- not a layout.
>

If we do take any type of daemon-oriented approach, then the daemon may,
in fact, want to know layout. Certainly when we present this information
to the user, layout might be relevant (i.e. "USB disk device #5 failure,"
vs. "USB disk device on the 3rd port of the 1st hub has failed"). We need
access to the topological information.

Heck, I might want different behavior between the case where I unplug all
devices individually, or if I unplug a hub (and thus all it's associated
devices) instead. Specifically, I'm thinking about laptops in this case,
where the user is using a single cable to a USB hub to attach a multitude
of devices at once. Under these circumstances, USB Ethernet driver might
want to use a static IP... otherwise, we're probably at the office and
DHCP is the right answer.

Matt

-- 
Matthew Dharm                                         InterNIC: MDD94
Engineer, Qualcomm, Inc.                              Cell: (619) 890-6943
Home: mdharm@one-eyed-alien.net                       Home: (858) 689-1908
Work: mdharm@qualcomm.com                             Work: (858) 651-7649 
Beep: page-matt@one-eyed-alien.net                    Beep: (858) 621-8155

Dudes! May the Open Source be with you. -- Eric S. Raymond User Friendly, 12/3/1998

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