]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usbfs: Kill urbs on interface before doing a set_interface
authorHans de Goede <hdegoede@redhat.com>
Wed, 9 Oct 2013 15:19:27 +0000 (17:19 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 4 Mar 2014 23:38:04 +0000 (15:38 -0800)
commit5ec9c1771ce83a1e2b7ec96ed9f29a9f1b25e71e
treef4a0e79c35b289436798007ff06c83b5006cf52f
parent6343e8bf09de16ab4dcae2c6ca1a0e8dbd4dd770
usbfs: Kill urbs on interface before doing a set_interface

The usb_set_interface documentation says:

 * Also, drivers must not change altsettings while urbs are scheduled for
 * endpoints in that interface; all such urbs must first be completed
 * (perhaps forced by unlinking).

For in kernel drivers we trust the drivers to get this right, but we
cannot trust userspace to get this right, so enforce it by killing any
urbs still pending on the interface.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/core/devio.c