Re: [linux-usb-devel] Re: [PATCH] driverfs support for USB - take 2

David Brownell (david-b@pacbell.net)
Tue, 29 Jan 2002 18:15:13 -0800


> > > > Yes, I need to have better names for the devices than just "usb_bus",
> > > > any suggestions? These devices nodes are really the USB root hubs in
> > > > the USB controller, so they could just have the USB number as the name
> > > > like the other USB devices (001), but that's pretty boring :)

Actually one of my criticisms of Greg's patch is that
it hides the actual device tree. The root hub is easily
distinguishable, it's the topmost one in the tree! There
should be no need to name it specially.

I'd really rather move away from the model which
exposes a USB bus as a flat non-hierarchical
setup, and move instead to a model reflects the
actual topology of the USB devices and hubs.

> > > "usb_root0" .. "usb_rootN" ?
> >
> > Hm, that's a good idea, it would match the usbfs bus numbers which
> > should keep people happy.
>
> Would it be usb_rootN or usb_busN?

I'd rather see neither, and have the device names reflect
physical topology ... so they could make sense to users.

For example, if you plug a USB device into a particular
USB socket it would have a particular name, and that
name would show up in diagnostics. So when something
goes flakey about the device, the diagnostic will be able
to completely identify it. And likewise, when userspace
tools need to do something, they should be able to use
the same pathname each time, unless the devices got
re-cabled ... re-enumerating shouldn't affect those names.

The notion of a "bus number" is bothersome, since it's
a function only of the order of driver initialization, and that
isn't a "stable" way to identify anything. Re-ordering
driver initialization shouldn't change device name.

- Dave

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