Re: [PATCH] USB: usbfs: deprecate and hide option for !embedded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2009 at 03:45:14PM -0400, Alan Stern wrote:
> On Tue, 21 Apr 2009, Greg KH wrote:
> 
> > On Tue, Apr 21, 2009 at 12:52:12PM -0400, Alan Stern wrote:
> > > On Tue, 21 Apr 2009, Scott James Remnant wrote:
> > > 
> > > > Modern systems do not use usbfs; the entries within it are files,
> > > > not device nodes, and do not support ACLs which are the default way to
> > > > provide access to USB devices to untrusted users.
> > > > 
> > > > It is replaced by device-nodes maintained by udev in /dev/bus/usb,
> > > > libusb uses this device nodes.
> > > > 
> > > > Mark the option as deprecated, and hide entirely for non-embedded builds
> > > > (which may not be using udev but require raw USB device access).
> > > 
> > > I don't like this at all.  usbfs provides /proc/bus/usb/devices, and 
> > > some of the information in that file is not easily available anywhere 
> > > else.
> > 
> > What is lacking in sysfs?  Here's a script from Randy Dunlap that pretty
> > much provides the equilivant.
> 
> That's a nice script.  Translating it into Perl might speed it up a 
> bit.

True, speed isn't really an issue for this, is it?

> What's missing in the script (or in sysfs)?  Several things.
> 
> 	The script doesn't list the parent and port values.  No
> 	doubt they can be added; certainly they are present in sysfs.
> 
> 	The script doesn't print bandwidth allocation information for 
> 	root hubs.

Do we export that information anywhere?

> 	You can't poll it to detect when devices are added or
> 	removed (although there may be other ways of doing this).

libudev provides this now.

> 	Sysfs doesn't contain information about configurations
> 	other than the current one, whereas /proc/bus/usb/devices
> 	lists all the configs.

That's the big one.  We should be able to just pull it out of the raw
configuration.  I was going to work on making usbview do that.

> By contrast, lsusb _does_ print all the configs.  But the values it 
> shows are taken from the device, not from the kernel's current data 
> structures.

Would they be different?

Now I love this file, have for many many years.  But the rest of usbfs
really does not need to be mounted anywhere, anymore.  I tried to take
it out of a few distros a number of years ago, but vmware messed up and
still relied on it.  Now that is fixed so we should be able to drop this
as well.

Maybe we can just move this devices file to /proc/ somewhere else?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux