<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/generic.c, branch v3.4.80</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/core/generic.c?h=v3.4.80</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/core/generic.c?h=v3.4.80'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-10T21:35:43Z</updated>
<entry>
<title>USB: accept RNDIS configs if there's no alternative</title>
<updated>2010-08-10T21:35:43Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-07-27T15:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4e0b508bcdd1af6b1b3c317042336936173591f'/>
<id>urn:sha1:c4e0b508bcdd1af6b1b3c317042336936173591f</id>
<content type='text'>
This patch (as1410) makes a slight change to the strategy used for
choosing a default configuration.  Currently we skip configs whose
first interface is RNDIS, if the kernel wasn't built with the
corresponding driver.  This risks losing access to the other
interfaces in those configs.  In addition, if there is only one config
then we will end up not configuring the device at all.

This changes the logic; now such configurations will be skipped only
if there is at least one other config.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Adam Kropelin &lt;akropel1@rochester.rr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: make hcd.h public (drivers dependency)</title>
<updated>2010-05-20T20:21:30Z</updated>
<author>
<name>Eric Lescouet</name>
<email>Eric.Lescouet@virtuallogix.com</email>
</author>
<published>2010-04-24T21:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27729aadd31dafddaaf64c24f8ef6d0ff750f3aa'/>
<id>urn:sha1:27729aadd31dafddaaf64c24f8ef6d0ff750f3aa</id>
<content type='text'>
The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/

Signed-of-by: Eric Lescouet &lt;eric@lescouet.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: don't choose configs with no interfaces</title>
<updated>2010-04-30T16:25:10Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-04-20T14:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62f9cfa3ece58268b3e92ca59c23b175f86205aa'/>
<id>urn:sha1:62f9cfa3ece58268b3e92ca59c23b175f86205aa</id>
<content type='text'>
This patch (as1372) fixes a bug in the routine that chooses the
default configuration to install when a new USB device is detected.
The algorithm is supposed to look for a config whose first interface
is for a non-vendor-specific class.  But the way it's currently
written, it will also accept a config with no interfaces at all, which
is not very useful.  (Believe it or not, such things do exist.)

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Andrew Victor &lt;avictor.za@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Convert a dev_info to a dev_dbg</title>
<updated>2009-12-11T19:55:13Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@linux.intel.com</email>
</author>
<published>2009-09-24T22:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b1f0a34ca983a6defb0431aa18c9268eb9ffcc4a'/>
<id>urn:sha1:b1f0a34ca983a6defb0431aa18c9268eb9ffcc4a</id>
<content type='text'>
Knowing which configuration was chosen is a debugging aid more than it
is informational.

Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: add API for userspace drivers to "claim" ports</title>
<updated>2009-09-23T13:46:22Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2009-06-29T14:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7cbe5dca399a50ce8aa74314b1d276e2fb904e1b'/>
<id>urn:sha1:7cbe5dca399a50ce8aa74314b1d276e2fb904e1b</id>
<content type='text'>
This patch (as1258) implements a feature that users have been asking
for: It gives programs the ability to "claim" a port on a hub, via a
new usbfs ioctl.  A device plugged into a "claimed" port will not be
touched by the kernel beyond the immediate necessities of
initialization and enumeration.

In particular, when a device is plugged into a "claimed" port, the
kernel will not select and install a configuration.  And when a config
is installed by usbfs or sysfs, the kernel will not probe any drivers
for any of the interfaces.  (However the kernel will fetch various
string descriptors during enumeration.  One could argue that this
isn't really necessary, but the strings are exported in sysfs.)

The patch does not guarantee exclusive access to these devices; it is
still possible for more than one program to open the device file
concurrently.  Programs are responsible for coordinating access among
themselves.

A demonstration program showing how to use the new interface can be 
found in an attachment to

	http://marc.info/?l=linux-usb&amp;m=124345857431452&amp;w=2

The patch also makes a small simplification to the hub driver,
replacing a bunch of more-or-less useless variants of "out of memory"
with a single message.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Enhance usage of pm_message_t</title>
<updated>2009-01-07T18:00:03Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2008-11-25T21:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65bfd2967c906ca322a4bb69a285fe0de8916ac6'/>
<id>urn:sha1:65bfd2967c906ca322a4bb69a285fe0de8916ac6</id>
<content type='text'>
This patch (as1177) modifies the USB core suspend and resume
routines.  The resume functions now will take a pm_message_t argument,
so they will know what sort of resume is occurring.  The new argument
is also passed to the port suspend/resume and bus suspend/resume
routines (although they don't use it for anything but debugging).

In addition, special pm_message_t values are used for user-initiated,
device-initiated (i.e., remote wakeup), and automatic suspend/resume.
By testing these values, drivers can tell whether or not a particular
suspend was an autosuspend.  Unfortunately, they can't do the same for
resumes -- not until the pm_message_t argument is also passed to the
drivers' resume methods.  That will require a bigger change.

IMO, the whole Power Management framework should have been set up this
way in the first place.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: fix possible deadlock involving sysfs attributes</title>
<updated>2008-05-29T20:59:03Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2008-05-20T20:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e16362a0c8d90e9adbfe477acbe32b021823fb22'/>
<id>urn:sha1:e16362a0c8d90e9adbfe477acbe32b021823fb22</id>
<content type='text'>
There is a potential deadlock when the usb_generic driver is unbound
from a device.  The problem is that generic_disconnect() is called
with the device lock held, and it removes a bunch of device attributes
from sysfs.  If a user task happens to be running an attribute method
at the time, the removal will block until the method returns.  But at
least one of the attribute methods (the store routine for power/level)
needs to acquire the device lock!

This patch (as1093) eliminates the deadlock by moving the calls to
create and remove the sysfs attributes from the usb_generic driver
into usb_new_device() and usb_disconnect(), where they can be invoked
without holding the device lock.

Besides, the other sysfs attributes are created when the device is
registered and removed when the device is unregistered.  So it seems
only fitting for the extra attributes to be created and removed at the
same time.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: move decision to ignore FREEZE events</title>
<updated>2007-10-12T21:55:26Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2007-09-10T15:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5ad4f71e2f19a06f738463da1f09ea7fda3a3db2'/>
<id>urn:sha1:5ad4f71e2f19a06f738463da1f09ea7fda3a3db2</id>
<content type='text'>
This patch (as987) changes the way FREEZE and PRETHAW suspend events
are handled in usbcore.  The decision about whether or not to ignore
them for non-root devices is pushed down into the USB-device driver,
instead of being made in the core code.

This is appropriate, since devices exported to a virtualized guest or
over a network may indeed need to handle these types of suspend, even
though normal devices don't.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: rename choose_configuration</title>
<updated>2007-10-12T21:55:08Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2007-08-03T04:44:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5ea060f1e19c6a3f409d3472c723da4517547b8'/>
<id>urn:sha1:b5ea060f1e19c6a3f409d3472c723da4517547b8</id>
<content type='text'>
As it is global, give it a usb specific name in the global namespace.

Cc: Inaky Perez-Gonzalez &lt;inaky@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>usb: introduce usb_authorize/deauthorize()</title>
<updated>2007-10-12T21:55:07Z</updated>
<author>
<name>Inaky Perez-Gonzalez</name>
<email>inaky@linux.intel.com</email>
</author>
<published>2007-08-01T03:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93993a0a3e528357ae4b9b0eb82fd4b428ebbf64'/>
<id>urn:sha1:93993a0a3e528357ae4b9b0eb82fd4b428ebbf64</id>
<content type='text'>
These USB API functions will do the full authorization/deauthorization
to be used for a device. When authorized we effectively allow a
configuration to be set. Reverse that when deauthorized.

Effectively this means that we have to clean all the configuration
descriptors on deauthorize and reload them when we authorized. We could
do without throwing them out for wired devices, but for wireless, we can
read them only after authenticating, and thus, when authorizing an
authenticated device we would need to read them. So to simplify, always
release them on deauthorize(), re-read them on authorize().

Also fix leak reported by Ragner Magalhaes; in usb_deauthorize_device(),
bNumConfigurations was being set to zero before the for loop, and thus
the different raw descriptors where never being freed.

Signed-off-by: Inaky Perez-Gonzalez &lt;inaky@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
