]> git.baikalelectronics.ru Git - kernel.git/commit
USB: add all configs to the "descriptors" attribute
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 20 May 2008 20:40:42 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 29 May 2008 20:59:03 +0000 (13:59 -0700)
commit75e0c295706f275697e3de6222b1f0abfdbe4b17
tree7933ca5e141fea2f5fe7595e5e1cc4580bb68488
parentdb742dadfb9ac5ee9ceed9683b8254fd488ef1a9
USB: add all configs to the "descriptors" attribute

This patch (as1094) changes the output of the "descriptors" binary
attribute.  Now it will contain the device descriptor followed by all
the configuration descriptors, not just the descriptor for the current
config.

Userspace libraries want to have access to the kernel's cached
descriptor information, so they can learn about device characteristics
without having to wake up suspended devices.  So far the only user of
this attribute is the new libusb-1.0 library; thus changing its
contents shouldn't cause any problems.

This should be considered for 2.6.26, if for no other reason than to
minimize the range of releases in which the attribute contains only the
current config descriptor.

Also, it doesn't hurt that the patch removes the device locking --
which was formerly needed in order to know for certain which config was
indeed current.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/sysfs.c