<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/generic.c, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-02-07T18:54:30Z</updated>
<entry>
<title>staging: usbip: convert usbip-host driver to usb_device_driver</title>
<updated>2014-02-07T18:54:30Z</updated>
<author>
<name>Valentina Manea</name>
<email>valentina.manea.m@gmail.com</email>
</author>
<published>2014-01-23T21:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7945b77cd03094458f3624bc82a27e0d36e75d0'/>
<id>urn:sha1:b7945b77cd03094458f3624bc82a27e0d36e75d0</id>
<content type='text'>
This driver was previously an interface driver. Since USB/IP
exports a whole device, not just an interface, it would make
sense to be a device driver.

This patch also modifies the way userspace sees and uses a
shared device:

* the usbip_status file is no longer created for interface 0, but for
the whole device (such as
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/usbip_status).
* per interface information, such as interface class or protocol, is
no longer sent/received; only device specific information is
transmitted.
* since the driver was moved one level below in the USB architecture,
there is no need to bind/unbind each interface, just the device as a
whole.

Signed-off-by: Valentina Manea &lt;valentina.manea.m@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: avoid error messages when a device is disconnected</title>
<updated>2013-03-28T18:05:52Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2013-03-27T20:14:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9e88fb7bca9f527ccdf4166a240a9023ba6ee73'/>
<id>urn:sha1:e9e88fb7bca9f527ccdf4166a240a9023ba6ee73</id>
<content type='text'>
This patch (as1673) reduces the amount of log spew from the hub driver
by removing a bunch of error messages in the case where the device in
question is already known to have been disconnected.  Since the
disconnect event itself appears in the log, there's no need for other
error messages.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Jenya Y &lt;jy.gerstmaier@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb/core: consider link speed while looking at bMaxPower</title>
<updated>2013-01-12T00:16:01Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-12-18T14:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d8479db3dde3ef7a9bc803e565842764fa21a53'/>
<id>urn:sha1:8d8479db3dde3ef7a9bc803e565842764fa21a53</id>
<content type='text'>
The USB 2.0 specification says that bMaxPower is the maximum power
consumption expressed in 2 mA units and the USB 3.0 specification says
that it is expressed in 8 mA units.
This patch adds a helper function usb_get_max_power() which computes the
value based on config &amp; usb_device's speed value. The the device descriptor
dump computes the value on its own.

Cc: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: fix authorization and claimed port logic</title>
<updated>2012-11-16T00:56:22Z</updated>
<author>
<name>Hindin Joseph</name>
<email>hindin@gmail.com</email>
</author>
<published>2012-11-04T20:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c13b86a336d089f248293776a853252fbca15c26'/>
<id>urn:sha1:c13b86a336d089f248293776a853252fbca15c26</id>
<content type='text'>
    It looks like I've run into some inconsistency in the USB stack behavior.

    The USB stack maintains, among others, two states for the attach
USB device: authorized and owned. Authorization state is accessible to
the user space code through correspondent sysfs files, the ownership
can be set by claiming the hub's port with ioctl call. Both state may
be set before the device is attached, by access the hub settings. When
the new device is attached, both authorization and ownership prevent
the kernel USB stack from setting the newly attached device
configuration, but when the device is authorized, the ownership state
is ignored. It looks like ignoring the ownership state on
authorization make the stack behavior inconsistent; it also prevents
the user space code from completely overriding configuration
selection, important for implementing workarounds for bugs in the
device configuration selection.

   The following patch makes the stack behavior more consistent, by
moving ownership test into usb_choose_configuration - the later
function is used both by generic_probe and usb_authorize_device

Signed-off-by: Joseph Hindin &lt;hindin@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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>
</feed>
