<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/class, branch v3.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=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-05T23:04:58Z</updated>
<entry>
<title>USB: cdc-wdm: fix lockup on error in wdm_read</title>
<updated>2012-07-05T23:04:58Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-02T08:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b086b6b10d9f182cd8d2f0dcfd7fd11edba93fc9'/>
<id>urn:sha1:b086b6b10d9f182cd8d2f0dcfd7fd11edba93fc9</id>
<content type='text'>
Clear the WDM_READ flag on empty reads to avoid running
forever in an infinite tight loop, causing lockups:

Jul  1 21:58:11 nemi kernel: [ 3658.898647] qmi_wwan 2-1:1.2: Unexpected error -71
Jul  1 21:58:36 nemi kernel: [ 3684.072021] BUG: soft lockup - CPU#0 stuck for 23s! [qmi.pl:12235]
Jul  1 21:58:36 nemi kernel: [ 3684.072212] CPU 0
Jul  1 21:58:36 nemi kernel: [ 3684.072355]
Jul  1 21:58:36 nemi kernel: [ 3684.072367] Pid: 12235, comm: qmi.pl Tainted: P           O 3.5.0-rc2+ #13 LENOVO 2776LEG/2776LEG
Jul  1 21:58:36 nemi kernel: [ 3684.072383] RIP: 0010:[&lt;ffffffffa0635008&gt;]  [&lt;ffffffffa0635008&gt;] spin_unlock_irq+0x8/0xc [cdc_wdm]
Jul  1 21:58:36 nemi kernel: [ 3684.072388] RSP: 0018:ffff88022dca1e70  EFLAGS: 00000282
Jul  1 21:58:36 nemi kernel: [ 3684.072393] RAX: ffff88022fc3f650 RBX: ffffffff811c56f7 RCX: 00000001000ce8c1
Jul  1 21:58:36 nemi kernel: [ 3684.072398] RDX: 0000000000000010 RSI: 000000000267d810 RDI: ffff88022fc3f650
Jul  1 21:58:36 nemi kernel: [ 3684.072403] RBP: ffff88022dca1eb0 R08: ffffffffa063578e R09: 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072407] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000002
Jul  1 21:58:36 nemi kernel: [ 3684.072412] R13: 0000000000000246 R14: ffffffff00000002 R15: ffff8802281d8c88
Jul  1 21:58:36 nemi kernel: [ 3684.072418] FS:  00007f666a260700(0000) GS:ffff88023bc00000(0000) knlGS:0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072423] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul  1 21:58:36 nemi kernel: [ 3684.072428] CR2: 000000000270d9d8 CR3: 000000022e865000 CR4: 00000000000007f0
Jul  1 21:58:36 nemi kernel: [ 3684.072433] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072438] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jul  1 21:58:36 nemi kernel: [ 3684.072444] Process qmi.pl (pid: 12235, threadinfo ffff88022dca0000, task ffff88022ff76380)
Jul  1 21:58:36 nemi kernel: [ 3684.072448] Stack:
Jul  1 21:58:36 nemi kernel: [ 3684.072458]  ffffffffa063592e 0000000100020000 ffff88022fc3f650 ffff88022fc3f6a8
Jul  1 21:58:36 nemi kernel: [ 3684.072466]  0000000000000200 0000000100000000 000000000267d810 0000000000000000
Jul  1 21:58:36 nemi kernel: [ 3684.072475]  0000000000000000 ffff880212cfb6d0 0000000000000200 ffff880212cfb6c0
Jul  1 21:58:36 nemi kernel: [ 3684.072479] Call Trace:
Jul  1 21:58:36 nemi kernel: [ 3684.072489]  [&lt;ffffffffa063592e&gt;] ? wdm_read+0x1a0/0x263 [cdc_wdm]
Jul  1 21:58:36 nemi kernel: [ 3684.072500]  [&lt;ffffffff8110adb7&gt;] ? vfs_read+0xa1/0xfb
Jul  1 21:58:36 nemi kernel: [ 3684.072509]  [&lt;ffffffff81040589&gt;] ? alarm_setitimer+0x35/0x64
Jul  1 21:58:36 nemi kernel: [ 3684.072517]  [&lt;ffffffff8110aec7&gt;] ? sys_read+0x45/0x6e
Jul  1 21:58:36 nemi kernel: [ 3684.072525]  [&lt;ffffffff813725f9&gt;] ? system_call_fastpath+0x16/0x1b
Jul  1 21:58:36 nemi kernel: [ 3684.072557] Code: &lt;66&gt; 66 90 c3 83 ff ed 89 f8 74 16 7f 06 83 ff a1 75 0a c3 83 ff f4

The WDM_READ flag is normally cleared by wdm_int_callback
before resubmitting the read urb, and set by wdm_in_callback
when this urb returns with data or an error.  But a crashing
device may cause both a read error and cancelling all urbs.
Make sure that the flag is cleared by wdm_read if the buffer
is empty.

We don't clear the flag on errors, as there may be pending
data in the buffer which should be processed.  The flag will
instead be cleared on the next wdm_read call.

Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdc-acm: fix devices not unthrottled on open</title>
<updated>2012-06-15T00:13:33Z</updated>
<author>
<name>Otto Meta</name>
<email>otto.patches@sister-shadow.de</email>
</author>
<published>2012-06-06T16:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c4707f3f8c44ec18282e1c014c80e1c257042f9'/>
<id>urn:sha1:6c4707f3f8c44ec18282e1c014c80e1c257042f9</id>
<content type='text'>
Currently CDC-ACM devices stay throttled when their TTY is closed while
throttled, stalling further communication attempts after the next open.

Unthrottling during open/activate got lost starting with kernel
3.0.0 and this patch reintroduces it.

Signed-off-by: Otto Meta &lt;otto.patches@sister-shadow.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: cdc-wdm: Add Vodafone/Huawei K5005 support</title>
<updated>2012-06-12T23:05:43Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-19T17:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de102ef41f24a4c251c4a3838796bb27557d4d93'/>
<id>urn:sha1:de102ef41f24a4c251c4a3838796bb27557d4d93</id>
<content type='text'>
Tested-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: Disable hub-initiated LPM for comms devices.</title>
<updated>2012-05-18T22:42:55Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-04-23T17:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1f12eb6ba6f1e74007eb01ed26fad7c5239d62b'/>
<id>urn:sha1:e1f12eb6ba6f1e74007eb01ed26fad7c5239d62b</id>
<content type='text'>
Hub-initiated LPM is not good for USB communications devices.  Comms
devices should be able to tell when their link can go into a lower power
state, because they know when an incoming transmission is finished.
Ideally, these devices would slam their links into a lower power state,
using the device-initiated LPM, after finishing the last packet of their
data transfer.

If we enable the idle timeouts for the parent hubs to enable
hub-initiated LPM, we will get a lot of useless LPM packets on the bus
as the devices reject LPM transitions when they're in the middle of
receiving data.  Worse, some devices might blindly accept the
hub-initiated LPM and power down their radios while they're in the
middle of receiving a transmission.

The Intel Windows folks are disabling hub-initiated LPM for all USB
communications devices under a xHCI USB 3.0 host.  In order to keep
the Linux behavior as close as possible to Windows, we need to do the
same in Linux.

Set the disable_hub_initiated_lpm flag for for all USB communications
drivers.  I know there aren't currently any USB 3.0 devices that
implement these class specifications, but we should be ready if they do.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Cc: Hansjoerg Lipp &lt;hjlipp@web.de&gt;
Cc: Tilman Schmidt &lt;tilman@imap.cc&gt;
Cc: Karsten Keil &lt;isdn@linux-pingi.de&gt;
Cc: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Cc: Jan Dumon &lt;j.dumon@option.com&gt;
Cc: Petko Manolov &lt;petkan@users.sourceforge.net&gt;
Cc: Steve Glendinning &lt;steve.glendinning@smsc.com&gt;
Cc: "John W. Linville" &lt;linville@tuxdriver.com&gt;
Cc: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Cc: "Luis R. Rodriguez" &lt;mcgrof@qca.qualcomm.com&gt;
Cc: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
Cc: Vasanthakumar Thiagarajan &lt;vthiagar@qca.qualcomm.com&gt;
Cc: Senthil Balasubramanian &lt;senthilb@qca.qualcomm.com&gt;
Cc: Christian Lamparter &lt;chunkeey@googlemail.com&gt;
Cc: Brett Rudley &lt;brudley@broadcom.com&gt;
Cc: Roland Vossen &lt;rvossen@broadcom.com&gt;
Cc: Arend van Spriel &lt;arend@broadcom.com&gt;
Cc: "Franky (Zhenhui) Lin" &lt;frankyl@broadcom.com&gt;
Cc: Kan Yan &lt;kanyan@broadcom.com&gt;
Cc: Dan Williams &lt;dcbw@redhat.com&gt;
Cc: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&gt;
Cc: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Cc: Gertjan van Wingerde &lt;gwingerde@gmail.com&gt;
Cc: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Cc: Herton Ronaldo Krzesinski &lt;herton@canonical.com&gt;
Cc: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
Cc: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Chaoming Li &lt;chaoming_li@realsil.com.cn&gt;
Cc: Daniel Drake &lt;dsd@gentoo.org&gt;
Cc: Ulrich Kunitz &lt;kune@deine-taler.de&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>USB: cdc-wdm: remove from device list on disconnect</title>
<updated>2012-05-11T22:19:22Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-09T11:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6286d85e8efdb59252d1ceb99a56fa6b0b11526c'/>
<id>urn:sha1:6286d85e8efdb59252d1ceb99a56fa6b0b11526c</id>
<content type='text'>
Prevents dereferencing an invalid struct usb_interface
pointer.

Always delete entry from device list whether or not the
rest of the device state cleanup is postponed. The device
list uses desc-&gt;intf as key, and wdm_open will dereference
this key while searching for a matching device.  A device
should not appear in the list unless probe() has succeeded
and disconnect() has not finished.

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: cdc-wdm: cannot use dev_printk when device is gone</title>
<updated>2012-05-11T22:19:22Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-09T11:53:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b0b79d38806481c1c8fffa7c5842f3c83679a42'/>
<id>urn:sha1:6b0b79d38806481c1c8fffa7c5842f3c83679a42</id>
<content type='text'>
We cannot dereference a removed USB interface for
dev_printk. Use pr_debug instead where necessary.

Flush errors are expected if device is unplugged and are
therefore best ingored at this point.

Move the kill_urbs() call in wdm_release with dev_dbg()
for the non disconnect, as we know it has already been
called if WDM_DISCONNECTING is set.  This does not
actually fix anything, but keeps the code more consistent.

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: cdc-wdm: poll must return POLLHUP if device is gone</title>
<updated>2012-05-11T22:19:22Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-05-09T11:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=616b6937e348ef2b4c6ea5fef2cd3c441145efb0'/>
<id>urn:sha1:616b6937e348ef2b4c6ea5fef2cd3c441145efb0</id>
<content type='text'>
Else the poll will be restarted indefinitely in a tight loop,
preventing final device cleanup.

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.4-rc6 into usb-next</title>
<updated>2012-05-07T16:03:39Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-05-07T16:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61906313bd41cde2f9aaa14e461e6108d3e71aaa'/>
<id>urn:sha1:61906313bd41cde2f9aaa14e461e6108d3e71aaa</id>
<content type='text'>
This resolves the conflict with:
	drivers/usb/host/ehci-tegra.c

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usblp.c: remove dbg() usage</title>
<updated>2012-05-02T04:33:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-05-02T04:33:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f306309fc07075a70f0731805c7db2f075ebcab'/>
<id>urn:sha1:4f306309fc07075a70f0731805c7db2f075ebcab</id>
<content type='text'>
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: cdc-wdm: cleanup error codes</title>
<updated>2012-04-30T13:58:56Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2012-04-30T07:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12a98b2bd8050b3cf28b50da612c484cdf174368'/>
<id>urn:sha1:12a98b2bd8050b3cf28b50da612c484cdf174368</id>
<content type='text'>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The internal error codes returned in the write() code
path cannot be simply passed on to user space.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Tested-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
