<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core, branch v3.0.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/core?h=v3.0.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/core?h=v3.0.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-08-17T17:55:51Z</updated>
<entry>
<title>usb/config: use proper endian access for wMaxPacketSize</title>
<updated>2011-08-17T17:55:51Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-07-29T09:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=024d78c79eb4ee5395ed8f13233b5b15e3445db3'/>
<id>urn:sha1:024d78c79eb4ee5395ed8f13233b5b15e3445db3</id>
<content type='text'>
commit 7de7c7d2cb49900e0b967be871bf695c7d6135c9 upstream.

wMaxPacketSize is __le16 and should be accessed as such. Also fix the
wBytesPerInterval assignment while here.

v2: also fix the wBytesPerInterval assigment, noticed by Matt Evans

This patch should be backported to the 3.0 kernel.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Matt Evans &lt;matt@ozlabs.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: additional regression fix for device removal</title>
<updated>2011-07-07T20:29:33Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-07-06T21:03:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ca5c485f55d326d9a23e4badd05890148aa53f74'/>
<id>urn:sha1:ca5c485f55d326d9a23e4badd05890148aa53f74</id>
<content type='text'>
Commit e534c5b831c8b8e9f5edee5c8a37753c808b80dc (USB: fix regression
occurring during device removal) didn't go far enough.  It failed to
take into account that when a driver claims multiple interfaces, it may
release them all at the same time.  As a result, some interfaces can
get released before they are unregistered, and we deadlock trying to
acquire the bandwidth_mutex that we already own.

This patch (asl478) handles this case by setting the "unregistering"
flag on all the interfaces before removing any of them.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable &lt;stable@kernel.org&gt;
Tested-by: Éric Piel &lt;eric.piel@tremplin-utc.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: fix regression occurring during device removal</title>
<updated>2011-07-01T21:20:39Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-07-01T20:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e534c5b831c8b8e9f5edee5c8a37753c808b80dc'/>
<id>urn:sha1:e534c5b831c8b8e9f5edee5c8a37753c808b80dc</id>
<content type='text'>
This patch (as1476) fixes a regression introduced by
fccf4e86200b8f5edd9a65da26f150e32ba79808 (USB: Free bandwidth when
usb_disable_device is called).  usb_disconnect() grabs the
bandwidth_mutex before calling usb_disable_device(), which calls down
indirectly to usb_set_interface(), which tries to acquire the
bandwidth_mutex.

The fix causes usb_set_interface() to return early when it is called
for an interface that has already been unregistered, which is what
happens in usb_disable_device().

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6</title>
<updated>2011-06-28T18:15:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-06-28T18:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e34b429a404675dc4fc4ad2ee339eea028da3ca'/>
<id>urn:sha1:2e34b429a404675dc4fc4ad2ee339eea028da3ca</id>
<content type='text'>
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  MAINTAINERS: add myself as maintainer of USB/IP
  usb: r8a66597-hcd: fix cannot detect low/full speed device
  USB: ehci-ath79: fix a NULL pointer dereference
  USB: Add new FT232H chip to drivers/usb/serial/ftdi_sio.c
  usb/isp1760: Fix bug preventing the unlinking of control urbs
  USB: Fix up URB error codes to reflect implementation.
  xhci: Always set urb-&gt;status to zero for isoc endpoints.
  xhci: Add reset on resume quirk for asrock p67 host
  xHCI 1.0: Incompatible Device Error
  USB: don't let errors prevent system sleep
  USB: don't let the hub driver prevent system sleep
  USB: change maintainership of ohci-hcd and ehci-hcd
  xHCI 1.0: Force Stopped Event(FSE)
  xhci: Don't warn about zeroed bMaxBurst descriptor field.
  USB: Free bandwidth when usb_disable_device is called.
  xhci: Reject double add of active endpoints.
  USB: TI 3410/5052 USB Serial Driver: Fix mem leak when firmware is too big.
  usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO
  usb: musb: host: compare status for negative error values
</content>
</entry>
<entry>
<title>Merge branch 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus</title>
<updated>2011-06-27T20:36:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2011-06-27T20:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95a2424ff9221624c3944f3732f6cfacbb522ae4'/>
<id>urn:sha1:95a2424ff9221624c3944f3732f6cfacbb522ae4</id>
<content type='text'>
* 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
  USB: Fix up URB error codes to reflect implementation.
  xhci: Always set urb-&gt;status to zero for isoc endpoints.
  xhci: Add reset on resume quirk for asrock p67 host
  xHCI 1.0: Incompatible Device Error
  xHCI 1.0: Force Stopped Event(FSE)
  xhci: Don't warn about zeroed bMaxBurst descriptor field.
  USB: Free bandwidth when usb_disable_device is called.
  xhci: Reject double add of active endpoints.
</content>
</entry>
<entry>
<title>PM: Rename dev_pm_info.in_suspend to is_prepared</title>
<updated>2011-06-21T21:19:50Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-06-18T18:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f76b168b6f117a49d36307053e1acbe30580ea5b'/>
<id>urn:sha1:f76b168b6f117a49d36307053e1acbe30580ea5b</id>
<content type='text'>
This patch (as1473) renames the "in_suspend" field in struct
dev_pm_info to "is_prepared", in preparation for an upcoming change.
The new name is more descriptive of what the field really means.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>USB: don't let errors prevent system sleep</title>
<updated>2011-06-16T00:44:56Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-06-15T20:27:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0af212ba8f123c2eba151af7726c34a50b127962'/>
<id>urn:sha1:0af212ba8f123c2eba151af7726c34a50b127962</id>
<content type='text'>
This patch (as1464) implements the recommended policy that most errors
during suspend or hibernation should not prevent the system from going
to sleep.  In particular, failure to suspend a USB driver or a USB
device should not prevent the sleep from succeeding:

Failure to suspend a device won't matter, because the device will
automatically go into suspend mode when the USB bus stops carrying
packets.  (This might be less true for USB-3.0 devices, but let's not
worry about them now.)

Failure of a driver to suspend might lead to trouble later on when the
system wakes up, but it isn't sufficient reason to prevent the system
from going to sleep.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: don't let the hub driver prevent system sleep</title>
<updated>2011-06-16T00:44:56Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-06-15T20:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cbb330045e5df8f665ac60227ff898421fc8fb92'/>
<id>urn:sha1:cbb330045e5df8f665ac60227ff898421fc8fb92</id>
<content type='text'>
This patch (as1465) continues implementation of the policy that errors
during suspend or hibernation should not prevent the system from going
to sleep.

In this case, failure to turn on the Suspend feature for a hub port
shouldn't be reported as an error.  There are situations where this
does actually occur (such as when the device plugged into that port
was disconnected in the recent past), and it turns out to be harmless.
There's no reason for it to prevent a system sleep.

Also, don't allow the hub driver to fail a system suspend if the
downstream ports aren't all suspended.  This is also harmless (and
should never happen, given the change mentioned above); printing a
warning message in the kernel log is all we really need to do.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: Free bandwidth when usb_disable_device is called.</title>
<updated>2011-06-15T21:05:18Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2011-06-06T06:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fccf4e86200b8f5edd9a65da26f150e32ba79808'/>
<id>urn:sha1:fccf4e86200b8f5edd9a65da26f150e32ba79808</id>
<content type='text'>
Tanya ran into an issue when trying to switch a UAS device from the BOT
configuration to the UAS configuration via the bConfigurationValue sysfs
file.  Before installing the UAS configuration, set_bConfigurationValue()
calls usb_disable_device().  That function is supposed to remove all host
controller resources associated with that device, but it leaves some state
in the xHCI host controller.

Commit 0791971ba8fbc44e4f476079f856335ed45e6324
	usb: allow drivers to use allocated bandwidth until unbound
added a call to usb_disable_device() in usb_set_configuration(), before
the xHCI bandwidth functions were invoked.  That commit fixed a bug, but
also introduced a bug that is triggered when a configured device is
switched to a new configuration.

usb_disable_device() goes through all the motions of unbinding the drivers
attached to active interfaces and removing the USB core structures
associated with those interfaces, but it doesn't actually remove the
endpoints from the internal xHCI host controller bandwidth structures.

When usb_disable_device() calls usb_disable_endpoint() with reset_hardware
set to true, the entries in udev-&gt;ep_out and udev-&gt;ep_in will be set to
NULL.  Usually, when the USB core installs a new configuration,
usb_hcd_alloc_bandwidth() will drop all non-NULL endpoints in udev-&gt;ep_out
and udev-&gt;ep_in before adding any new endpoints.  However, when the new
UAS configuration was added, all those entries were null, so none of the
old endpoints in the BOT configuration were dropped.

The xHCI driver blindly added the UAS configuration endpoints, and some of
the endpoint addresses overlapped with the old BOT configuration
endpoints.  This caused the xHCI host to reject the Configure Endpoint
command.  Now that the xHCI driver code is cleaned up to reject a
double-add of active endpoints, we need to fix the USB core to properly
drop old endpoints in usb_disable_device().

If the host controller driver needs bandwidth checking support, make
usb_disable_device() call usb_disable_endpoint() with
reset_hardware set to false, drop the endpoints from the xHCI host
controller, and then call usb_disable_endpoint() again with
reset_hardware set to true.

The first call to usb_disable_endpoint() will cancel any pending URBs and
wait on them to be freed in usb_hcd_disable_endpoint(), but will keep the
pointers in udev-&gt;ep_out and udev-&gt;ep in intact.  Then
usb_hcd_alloc_bandwidth() will use those pointers to know which endpoints
to drop.

The final call to usb_disable_endpoint() will do two things:

1. It will call usb_hcd_disable_endpoint() again, which should be harmless
since the ep-&gt;urb_list should be empty after the first call to
usb_disable_endpoint() returns.

2. It will set the entries in udev-&gt;ep_out and udev-&gt;ep in to NULL, and call
usb_hcd_disable_endpoint().  That call will have no effect, since the xHCI
driver doesn't set the endpoint_disable function pointer.

Note that usb_disable_device() will now need to be called with
hcd-&gt;bandwidth_mutex held.

This should be backported to kernels as old as 2.6.32.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Reported-by: Tanya Brokhman &lt;tlinder@codeaurora.org&gt;
Cc: ablay@codeaurora.org
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>usb: remove bad dput after dentry_unhash</title>
<updated>2011-06-06T23:26:59Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-05-31T16:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1d4a4bde6b1cd4c8bbe1dd20dee18416a62b9c51'/>
<id>urn:sha1:1d4a4bde6b1cd4c8bbe1dd20dee18416a62b9c51</id>
<content type='text'>
Commit 64252c75a (vfs: remove dget() from dentry_unhash()) removed the
useless dget from dentry_unhash but didn't fix up this caller in the usb
code.  There used to be exactly one dput per dentry_unhash call; now
there are none.

Tested-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
