Re: Flaw in the driver-model implementation of attributes

From: Alan Stern (
Date: Tue Jun 17 2003 - 15:20:29 EST

On Tue, 17 Jun 2003, Greg KH wrote:

> > How about creating a /sys/class/usb/usb-storage/ directory, under which
> > there could be a directory for each USB mass-storage device? Or would it
> > be better to create a usb-storage.# directory under the interface's
> > directory in /sys/devices/ ?
> class/usb-storage/ would be fine with me.
> > It's worth pointing out that both the OHCI and EHCI drivers also do the
> > same wrong thing. They create their attribute files in a directory
> > owned by the PCI driver.
> Yup, you are correct, time to add class/usb-host/ :)

By the time we're done, there will be /sys/class/drivertype for every
driver in the system!

Seriously, do you think /sys/class/usb-storage is really appropriate? It
would be like creating /sys/class/ide-devices. Wouldn't something under
/sys/class/usb/ be better, say /sys/class/usb/mass-storage/ ?

Or would it be still better simply to create something like
/sys/devices/pci0/0000:00:07.2/usb1/1-1/1-1:0/storage/ ? A little
confusing perhaps, because it would refer to the same physical device as
its parent, but not inappropriate.

Alan Stern

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:22 EST