<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/message.c, branch v3.10.29</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/core/message.c?h=v3.10.29</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/core/message.c?h=v3.10.29'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-12T00:16:01Z</updated>
<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.amat.us/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: core: Free the allocated memory before exiting on error</title>
<updated>2012-11-21T21:32:26Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2012-11-21T05:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c058f7ab94143dfa2286e496019b7ad0b95502ac'/>
<id>urn:sha1:c058f7ab94143dfa2286e496019b7ad0b95502ac</id>
<content type='text'>
'new_interfaces' should be freed to avoid memory leak.

Cc: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&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-core: remove CONFIG_HOTPLUG ifdefs</title>
<updated>2012-11-21T21:27:16Z</updated>
<author>
<name>Bill Pemberton</name>
<email>wfp5p@virginia.edu</email>
</author>
<published>2012-11-19T18:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2bd6a021e887c675116ff8cdacc3af49999a2224'/>
<id>urn:sha1:2bd6a021e887c675116ff8cdacc3af49999a2224</id>
<content type='text'>
Remove conditional code based on CONFIG_HOTPLUG being false.  It's
always on now in preparation of it going away as an option.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: fix endpoint-disabling for failed config changes</title>
<updated>2012-11-12T02:06:48Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-11-07T15:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36caff5d795429c572443894e8789c2150dd796b'/>
<id>urn:sha1:36caff5d795429c572443894e8789c2150dd796b</id>
<content type='text'>
This patch (as1631) fixes a bug that shows up when a config change
fails for a device under an xHCI controller.  The controller needs to
be told to disable the endpoints that have been enabled for the new
config.  The existing code does this, but before storing the
information about which endpoints were enabled!  As a result, any
second attempt to install the new config is doomed to fail because
xhci-hcd will refuse to enable an endpoint that is already enabled.

The patch optimistically initializes the new endpoints' device
structures before asking the device to switch to the new config.  If
the request fails then the endpoint information is already stored, so
we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no
trouble.  The rest of the error path is slightly more complex now; we
have to disable the new interfaces and call put_device() rather than
simply deallocating them.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Matthias Schniedermeyer &lt;ms@citd.de&gt;
CC: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: core: remove unused dbg() call in message.c</title>
<updated>2012-09-13T18:23:03Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-09-13T18:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2d57aec81f3d479642523fd4d3537006168c240'/>
<id>urn:sha1:c2d57aec81f3d479642523fd4d3537006168c240</id>
<content type='text'>
It's not needed, and commented out, so just remove it.

Cc: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: Enable Latency Tolerance Messaging (LTM).</title>
<updated>2012-07-11T11:06:48Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-06-25T19:08:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f74631e3426474183389e55f703797bd965cd356'/>
<id>urn:sha1:f74631e3426474183389e55f703797bd965cd356</id>
<content type='text'>
USB 3.0 devices may optionally support a new feature called Latency
Tolerance Messaging.  If both the xHCI host controller and the device
support LTM, it should be turned on in order to give the system hardware
a better clue about the latency tolerance values of its PCI devices.

Once a Set Feature request to enable LTM is received, the USB 3.0 device
will begin to send LTM updates as its buffers fill or empty, and it can
tolerate more or less latency.

The USB 3.0 spec, section C.4.2 says that LTM should be disabled just
before the device is placed into suspend.  Then the device will send an
updated LTM notification, so that the system doesn't think it should
remain in an active state in order to satisfy the latency requirements
of the suspended device.

The Set and Clear Feature LTM enable command can only be sent to a
configured device.  The device will respond with an error if that
command is sent while it is in the Default or Addressed state.  Make
sure to check udev-&gt;actconfig in usb_enable_ltm() and usb_disable_ltm(),
and don't send those commands when the device is unconfigured.

LTM should be enabled once a new configuration is installed in
usb_set_configuration().  If we end up sending duplicate Set Feature LTM
Enable commands on a switch from one installed configuration to another
configuration, that should be harmless.

Make sure that LTM is disabled before the device is unconfigured in
usb_disable_device().  If no drivers are bound to the device, it doesn't
make sense to allow the device to control the latency tolerance of the
xHCI host controller.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>USB: Fix LPM disable count mismatch on driver unbind.</title>
<updated>2012-07-11T11:06:47Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-07-05T21:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=249719121bc2b841bdfcab5eb21b10d8b871743b'/>
<id>urn:sha1:249719121bc2b841bdfcab5eb21b10d8b871743b</id>
<content type='text'>
When a user runs `echo 0 &gt; bConfigurationValue` for a USB 3.0 device,
usb_disable_device() is called.  This function disables all drivers,
deallocates interfaces, and sets the device configuration value to 0
(unconfigured).

With the new scheme to ensure that unconfigured devices have LPM
disabled, usb_disable_device() must call usb_unlocked_disable_lpm() once
it unconfigures the device.

This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2c1100e8244c09bf560f97aca5a311d "USB: Disable USB
3.0 LPM in critical sections."

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>USB: Disable LPM while the device is unconfigured.</title>
<updated>2012-07-11T11:06:46Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-07-04T06:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9cf65991dd93ac3d5f97f536171c388918b7c1a9'/>
<id>urn:sha1:9cf65991dd93ac3d5f97f536171c388918b7c1a9</id>
<content type='text'>
The USB 3.0 Set/Clear Feature U1/U2 Enable cannot be sent to a device in
the Default or Addressed state.  It can only be sent to a configured
device.  Change the USB core to initialize the LPM disable count to 1
(disabled), which reflects this limitation.

Change usb_set_configuration() to ensure that if the device is
unconfigured on entry, usb_lpm_disable() is not called.  This avoids
sending the Clear Feature U1/U2 when the device is in the Addressed
state.  When usb_set_configuration() exits with a successfully installed
configuration, usb_lpm_enable() will be called.

Once the new configuration is installed, make sure
usb_set_configuration() only calls usb_enable_lpm() if the device moved
to the Configured state.  If we have unconfigured the device by sending
it a Set Configuration for config 0, don't enable LPM.

This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2c1100e8244c09bf560f97aca5a311d "USB: Disable USB
3.0 LPM in critical sections."

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge 3.5-rc3 into usb-next</title>
<updated>2012-06-20T23:24:02Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-06-20T23:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff446f2001cf9b5ed97c6256c4ee3549d3b7abed'/>
<id>urn:sha1:ff446f2001cf9b5ed97c6256c4ee3549d3b7abed</id>
<content type='text'>
This lets us catch the USB fixes that went into 3.5-rc3 into this branch,
as we want them here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: fix gathering of interface associations</title>
<updated>2012-06-15T00:13:34Z</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2012-06-12T18:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3a3dd074f7053ef824ad077e5331b52220ceba1'/>
<id>urn:sha1:b3a3dd074f7053ef824ad077e5331b52220ceba1</id>
<content type='text'>
TEAC's UD-H01 (and probably other devices) have a gap in the interface
number allocation of their descriptors:

  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          220
    bNumInterfaces          3
    [...]
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      [...]
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         2
      bInterfaceCount         2
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      [...]

Once a configuration is selected, usb_set_configuration() walks the
known interfaces of a given configuration and calls find_iad() on
each of them to set the interface association pointer the interface
is included in.

The problem here is that the loop variable is taken for the interface
number in the comparison logic that gathers the association. Which is
fine as long as the descriptors are sane.

In the case above, however, the logic gets out of sync and the
interface association fields of all interfaces beyond the interface
number gap are wrong.

Fix this by passing the interface's bInterfaceNumber to find_iad()
instead.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: bEN &lt;ml_all@circa.be&gt;
Reported-by: Ivan Perrone &lt;ivanperrone@hotmail.com&gt;
Tested-by: ivan perrone &lt;ivanperrone@hotmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
