On Wed, 14 Sep 2005, Greg KH wrote:
> Any objections to me adding this to mainline after 2.6.14 comes out?
> I think we now have all of the information that is in
> /proc/bus/usb/devices in sysfs. Or does anyone know of anything we are
> missing?
>
> And yes, it's a huge pain to dynamically create sysfs attributes and
> attribute groups on the fly, but I couldn't think of any other way to do
> this. Any suggestions?
>
> This also takes advantage of the ability to do create a different type
> of attribute, and use it from within the sysfs callback, something that
> I don't think people really realize is now possible.
Nice. Here are a few thoughts:
This adds to sysfs all the information in /proc/bus/usb/devices _for the
active configuration and the current altsettings_. There's nothing about
the other configurations or altsettings, and of course we don't really
want there to be.
Your usb_{create|remove}_intf_ep_files routines are called whenever
interfaces are created or destroyed. But you also need to call them
whenever an altsetting is changed. Which causes difficulties, because in
usb_remove_ep_files, it will no longer be safe to kfree all those data
structures. Unlike interfaces, altsettings aren't refcounted. All the
altsettings for an interface are created/removed at the same time as the
configuration (actually, the interface_cache).
What is the overhead, in terms of memory usage, of creating all these
structures for the sysfs attributes?
Alan Stern
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel