<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-12T19:29:46Z</updated>
<entry>
<title>usb: cdc-acm: Fix acm_tty_hangup() vs. acm_tty_close() race</title>
<updated>2012-01-12T19:29:46Z</updated>
<author>
<name>Thilo-Alexander Ginkel</name>
<email>thilo@ginkel.com</email>
</author>
<published>2011-12-17T09:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9fd8d6232137e255fc9409a81cf282817472b6f'/>
<id>urn:sha1:f9fd8d6232137e255fc9409a81cf282817472b6f</id>
<content type='text'>
[Not upstream as it was fixed differently for 3.3 with a much more
"intrusive" rework of the driver - gregkh]

There is a race condition involving acm_tty_hangup() and acm_tty_close()
where hangup() would attempt to access tty-&gt;driver_data without proper
locking and NULL checking after close() has potentially already set it
to NULL.  One possibility to (sporadically) trigger this behavior is to
perform a suspend/resume cycle with a running WWAN data connection.

This patch addresses the issue by introducing a NULL check for
tty-&gt;driver_data in acm_tty_hangup() protected by open_mutex and exiting
gracefully when hangup() is invoked on a device that has already been
closed.

Signed-off-by: Thilo-Alexander Ginkel &lt;thilo@ginkel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>usb: ch9: fix up MaxStreams helper</title>
<updated>2012-01-12T19:29:43Z</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2012-01-02T11:35:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2570fc048ca1307e64572c825e0d7908bd60a21'/>
<id>urn:sha1:d2570fc048ca1307e64572c825e0d7908bd60a21</id>
<content type='text'>
commit 18b7ede5f7ee2092aedcb578d3ac30bd5d4fc23c upstream.

[ removed the dwc3 portion of the patch as it didn't apply to
older kernels - gregkh]

According to USB 3.0 Specification Table 9-22, if
bmAttributes [4:0] are set to zero, it means "no
streams supported", but the way this helper was
defined on Linux, we will *always* have one stream
which might cause several problems.

For example on DWC3, we would tell the controller
endpoint has streams enabled and yet start transfers
with Stream ID set to 0, which would goof up the host
side.

While doing that, convert the macro to an inline
function due to the different checks we now need.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>xhci: Properly handle COMP_2ND_BW_ERR</title>
<updated>2012-01-12T19:29:43Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2012-01-04T22:29:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b511b783385bc68663e4729be7f169ce3061e6d'/>
<id>urn:sha1:5b511b783385bc68663e4729be7f169ce3061e6d</id>
<content type='text'>
commit 71d85724bdd947a3b42a88d08af79f290a1a767b upstream.

I encountered a result of COMP_2ND_BW_ERR while improving how the pwc
webcam driver handles not having the full usb1 bandwidth available to
itself.

I created the following test setup, a NEC xhci controller with a
single TT USB 2 hub plugged into it, with a usb keyboard and a pwc webcam
plugged into the usb2 hub. This caused the following to show up in dmesg
when trying to stream from the pwc camera at its highest alt setting:

xhci_hcd 0000:01:00.0: ERROR: unexpected command completion code 0x23.
usb 6-2.1: Not enough bandwidth for altsetting 9

And usb_set_interface returned -EINVAL, which caused my pwc code to not
do the right thing as it expected -ENOSPC.

This patch makes the xhci driver properly handle COMP_2ND_BW_ERR and makes
usb_set_interface return -ENOSPC as expected.

This should be backported to stable kernels as old as 2.6.32.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>usb: fix number of mapped SG DMA entries</title>
<updated>2012-01-12T19:29:43Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-12-03T22:41:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4781ace0ddff8057f2c1bf1811ae4886f8b88876'/>
<id>urn:sha1:4781ace0ddff8057f2c1bf1811ae4886f8b88876</id>
<content type='text'>
commit bc677d5b64644c399cd3db6a905453e611f402ab upstream.

Add a new field num_mapped_sgs to struct urb so that we have a place to
store the number of mapped entries and can also retain the original
value of entries in num_sgs.  Previously, usb_hcd_map_urb_for_dma()
would overwrite this with the number of mapped entries, which would
break dma_unmap_sg() because it requires the original number of entries.

This fixes warnings like the following when using USB storage devices:
 ------------[ cut here ]------------
 WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()
 ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1]
 Modules linked in: ohci_hcd ehci_hcd
 Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff81036d3b&gt;] warn_slowpath_common+0x80/0x98
  [&lt;ffffffff81036de7&gt;] warn_slowpath_fmt+0x41/0x43
  [&lt;ffffffff811fa5ae&gt;] check_unmap+0x4e4/0x695
  [&lt;ffffffff8105e92c&gt;] ? trace_hardirqs_off+0xd/0xf
  [&lt;ffffffff8147208b&gt;] ? _raw_spin_unlock_irqrestore+0x33/0x50
  [&lt;ffffffff811fa84a&gt;] debug_dma_unmap_sg+0xeb/0x117
  [&lt;ffffffff8137b02f&gt;] usb_hcd_unmap_urb_for_dma+0x71/0x188
  [&lt;ffffffff8137b166&gt;] unmap_urb_for_dma+0x20/0x22
  [&lt;ffffffff8137b1c5&gt;] usb_hcd_giveback_urb+0x5d/0xc0
  [&lt;ffffffffa0000d02&gt;] ehci_urb_done+0xf7/0x10c [ehci_hcd]
  [&lt;ffffffffa0001140&gt;] qh_completions+0x429/0x4bd [ehci_hcd]
  [&lt;ffffffffa000340a&gt;] ehci_work+0x95/0x9c0 [ehci_hcd]
  ...
 ---[ end trace f29ac88a5a48c580 ]---
 Mapped at:
  [&lt;ffffffff811faac4&gt;] debug_dma_map_sg+0x45/0x139
  [&lt;ffffffff8137bc0b&gt;] usb_hcd_map_urb_for_dma+0x22e/0x478
  [&lt;ffffffff8137c494&gt;] usb_hcd_submit_urb+0x63f/0x6fa
  [&lt;ffffffff8137d01c&gt;] usb_submit_urb+0x2c7/0x2de
  [&lt;ffffffff8137dcd4&gt;] usb_sg_wait+0x55/0x161

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c</title>
<updated>2012-01-12T19:29:42Z</updated>
<author>
<name>Malte Schröder</name>
<email>maltesch@gmx.de</email>
</author>
<published>2012-01-05T19:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2758dc6e9a3a0243e120df6132406f409ffd2bf'/>
<id>urn:sha1:d2758dc6e9a3a0243e120df6132406f409ffd2bf</id>
<content type='text'>
commit 08e87d0d773dc9ca5faf4c3306e238ed0ea129b0 upstream.

Hi, below patch adds the USB-ID of the serial adapters sold by
Multiplex RC (www.multiplex-rc.de).

Signed-off-by: Malte Schröder &lt;maltesch@gmx.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>usb: option: add ZD Incorporated HSPA modem</title>
<updated>2012-01-12T19:29:42Z</updated>
<author>
<name>Janne Snabb</name>
<email>snabb@epipe.com</email>
</author>
<published>2011-12-28T19:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ff8999cb9dabcac0cbb8a778f79fb991f2358c8'/>
<id>urn:sha1:3ff8999cb9dabcac0cbb8a778f79fb991f2358c8</id>
<content type='text'>
commit 3c8c9316710b83e906e425024153bf0929887b59 upstream.

Add support for Chinese Noname HSPA USB modem which is apparently
manufactured by a company called ZD Incorporated (based on texts in the
Windows drivers).

This product is available at least from Dealextreme (SKU 80032) and
possibly in India with name Olive V-MW250. It is based on Qualcomm
MSM6280 chip.

I needed to also add "options usb-storage quirks=0685:7000:i" in modprobe
configuration because udevd or the kernel keeps poking the embedded
fake-cd-rom which fails and causes the device to reset. There might be
a better way to accomplish the same. usb_modeswitch is not needed with
this device.

Signed-off-by: Janne Snabb &lt;snabb@epipe.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: omninet: fix write_room</title>
<updated>2012-01-12T19:29:41Z</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2011-11-06T18:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4868343c4dde5315ffebc08de71ddffdd1460d8'/>
<id>urn:sha1:b4868343c4dde5315ffebc08de71ddffdd1460d8</id>
<content type='text'>
commit 694c6301e515bad574af74b6552134c4d9dcb334 upstream.

Fix regression introduced by commit 507ca9bc047666 ([PATCH] USB: add
ability for usb-serial drivers to determine if their write urb is
currently being used.) which inverted the logic in write_room so that it
returns zero when the write urb is actually free.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>usb: musb: fix pm_runtime mismatch</title>
<updated>2012-01-12T19:29:41Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2011-12-19T20:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=945d49b38f4e3aa8a570b2fe51f179e7c2181b4d'/>
<id>urn:sha1:945d49b38f4e3aa8a570b2fe51f179e7c2181b4d</id>
<content type='text'>
commit 772aed45b604c5ff171f0f12c12392d868333f79 upstream.

In musb_init_controller() there's a pm_runtime_put(), but there's no
pm_runtime_get(), which creates a mismatch that causes the driver to
sleep when it shouldn't.

This was introduced in 7acc619[1], but it wasn't triggered in my setup
until 18a2689[2] was merged to Linus' branch at point df0914[3]. IOW;
when PM is working as it was supposed to.

However, it seems most of the time this is used in a way that keeps the
counter above 0, so nobody noticed. Also, it seems to depend on the
configuration used in versions before 3.1, but not later (or in it).

I found the problem by loading isp1704_charger before any usb gadgets:
http://article.gmane.org/gmane.linux.kernel/1226122

All versions after 2.6.39 are affected.

[1] usb: musb: Idle path retention and offmode support for OMAP3
[2] OMAP2+: musb: hwmod adaptation for musb registration
[3] Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

Cc: Hema HK &lt;hemahk@ti.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;

</content>
</entry>
<entry>
<title>USB: add quirk for another camera</title>
<updated>2012-01-12T19:29:40Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2012-01-03T08:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd857f5b4dc1d8d010da1711b71be789054fbcbe'/>
<id>urn:sha1:dd857f5b4dc1d8d010da1711b71be789054fbcbe</id>
<content type='text'>
commit 35284b3d2f68a8a3703745e629999469f78386b5 upstream.

The Guillemot Webcam Hercules Dualpix Exchange camera
has been reported with a second ID.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: pxa168: Fix compilation error</title>
<updated>2012-01-12T19:29:40Z</updated>
<author>
<name>Tanmay Upadhyay</name>
<email>tanmay.upadhyay@einfochips.com</email>
</author>
<published>2011-12-08T04:33:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=966c248e661ce7d265caeb73c7d0aa68fbf8801a'/>
<id>urn:sha1:966c248e661ce7d265caeb73c7d0aa68fbf8801a</id>
<content type='text'>
commit 35657c4d72925936c7219cc5caac118ca632acc2 upstream.

After commit c430131a02d677aa708f56342c1565edfdacb3c0 (Support
controllers with big endian capability regs), HC_LENGTH takes
two arguments. This patch fixes following compilation error:

In file included from drivers/usb/host/ehci-hcd.c:1323:
drivers/usb/host/ehci-pxa168.c:302:54: error: macro "HC_LENGTH" requires 2 arguments, but only 1 given
In file included from drivers/usb/host/ehci-hcd.c:1323:
drivers/usb/host/ehci-pxa168.c: In function 'ehci_pxa168_drv_probe':
drivers/usb/host/ehci-pxa168.c:302: error: 'HC_LENGTH' undeclared (first use in this function)
drivers/usb/host/ehci-pxa168.c:302: error: (Each undeclared identifier is reported only once
drivers/usb/host/ehci-pxa168.c:302: error: for each function it appears in.)

Signed-off-by: Tanmay Upadhyay &lt;tanmay.upadhyay@einfochips.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
