<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb, branch v3.2.59</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>usb: option: add and update a number of CMOTech devices</title>
<updated>2014-05-18T13:58:09+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-04-25T16:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74627ab15f07468eab311749ce4e225135daaa8b'/>
<id>74627ab15f07468eab311749ce4e225135daaa8b</id>
<content type='text'>
commit 34f972d6156fe9eea2ab7bb418c71f9d1d5c8e7b upstream.

A number of older CMOTech modems are based on Qualcomm
chips.  The blacklisted interfaces are QMI/wwan.

Reported-by: Lars Melin &lt;larsm17@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 34f972d6156fe9eea2ab7bb418c71f9d1d5c8e7b upstream.

A number of older CMOTech modems are based on Qualcomm
chips.  The blacklisted interfaces are QMI/wwan.

Reported-by: Lars Melin &lt;larsm17@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: option: add Alcatel L800MA</title>
<updated>2014-05-18T13:58:09+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-04-25T16:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=809d883333e08d5f4da99a32ec8cabbf6f6cce8e'/>
<id>809d883333e08d5f4da99a32ec8cabbf6f6cce8e</id>
<content type='text'>
commit dd6b48ecec2ea7d15f28d5e5474388681899a5e1 upstream.

Device interface layout:
0: ff/ff/ff - serial
1: ff/00/00 - serial AT+PPP
2: ff/ff/ff - QMI/wwan
3: 08/06/50 - storage

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit dd6b48ecec2ea7d15f28d5e5474388681899a5e1 upstream.

Device interface layout:
0: ff/ff/ff - serial
1: ff/00/00 - serial AT+PPP
2: ff/ff/ff - QMI/wwan
3: 08/06/50 - storage

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: option: add Olivetti Olicard 500</title>
<updated>2014-05-18T13:58:08+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-04-25T16:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c0d47d94f551705439b22348dbe33189fc7ca0df'/>
<id>c0d47d94f551705439b22348dbe33189fc7ca0df</id>
<content type='text'>
commit 533b3994610f316e5cd61b56d0c4daa15c830f89 upstream.

Device interface layout:
0: ff/ff/ff - serial
1: ff/ff/ff - serial AT+PPP
2: 08/06/50 - storage
3: ff/ff/ff - serial
4: ff/ff/ff - QMI/wwan

Reported-by: Julio Araujo &lt;julio.araujo@wllctel.com.br&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 533b3994610f316e5cd61b56d0c4daa15c830f89 upstream.

Device interface layout:
0: ff/ff/ff - serial
1: ff/ff/ff - serial AT+PPP
2: 08/06/50 - storage
3: ff/ff/ff - serial
4: ff/ff/ff - QMI/wwan

Reported-by: Julio Araujo &lt;julio.araujo@wllctel.com.br&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: io_ti: fix firmware download on big-endian machines</title>
<updated>2014-05-18T13:58:08+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2014-04-25T13:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=83ad4b788fc49cdc9fce56e4147c7cfde3d97c6a'/>
<id>83ad4b788fc49cdc9fce56e4147c7cfde3d97c6a</id>
<content type='text'>
commit 5509076d1b4485ce9fb07705fcbcd2695907ab5b upstream.

During firmware download the device expects memory addresses in
big-endian byte order. As the wIndex parameter which hold the address is
sent in little-endian byte order regardless of host byte order, we need
to use swab16 rather than cpu_to_be16.

Also make sure to handle the struct ti_i2c_desc size parameter which is
returned in little-endian byte order.

Reported-by: Ludovic Drolez &lt;ldrolez@debian.org&gt;
Tested-by: Ludovic Drolez &lt;ldrolez@debian.org&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5509076d1b4485ce9fb07705fcbcd2695907ab5b upstream.

During firmware download the device expects memory addresses in
big-endian byte order. As the wIndex parameter which hold the address is
sent in little-endian byte order regardless of host byte order, we need
to use swab16 rather than cpu_to_be16.

Also make sure to handle the struct ti_i2c_desc size parameter which is
returned in little-endian byte order.

Reported-by: Ludovic Drolez &lt;ldrolez@debian.org&gt;
Tested-by: Ludovic Drolez &lt;ldrolez@debian.org&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb/xhci: fix compilation warning when !CONFIG_PCI &amp;&amp; !CONFIG_PM</title>
<updated>2014-05-18T13:58:08+00:00</updated>
<author>
<name>David Cohen</name>
<email>david.a.cohen@linux.intel.com</email>
</author>
<published>2014-04-25T16:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42eb6ec92202136f18b50f69d1bec89c14badc60'/>
<id>42eb6ec92202136f18b50f69d1bec89c14badc60</id>
<content type='text'>
commit 01bb59ebffdec314da8da66266edf29529372f9b upstream.

When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
warning:
drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
but not used [-Wunused-function]

Instead of creating nested #ifdefs, this patch fixes it by defining the
xHCI PCI stubs as inline.

This warning has been in since 3.2 kernel and was
caused by commit 421aa841a134f6a743111cf44d0c6d3b45e3cf8c
"usb/xhci: hide MSI code behind PCI bars", but wasn't noticed
until 3.13 when a configuration with these options was tried

Signed-off-by: David Cohen &lt;david.a.cohen@linux.intel.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 01bb59ebffdec314da8da66266edf29529372f9b upstream.

When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
warning:
drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
but not used [-Wunused-function]

Instead of creating nested #ifdefs, this patch fixes it by defining the
xHCI PCI stubs as inline.

This warning has been in since 3.2 kernel and was
caused by commit 421aa841a134f6a743111cf44d0c6d3b45e3cf8c
"usb/xhci: hide MSI code behind PCI bars", but wasn't noticed
until 3.13 when a configuration with these options was tried

Signed-off-by: David Cohen &lt;david.a.cohen@linux.intel.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: Prefer endpoint context dequeue pointer over stopped_trb</title>
<updated>2014-05-18T13:58:08+00:00</updated>
<author>
<name>Julius Werner</name>
<email>jwerner@chromium.org</email>
</author>
<published>2014-04-25T16:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b9c6d6dae2dc8dc5fe991eb3bdc34233d9262b80'/>
<id>b9c6d6dae2dc8dc5fe991eb3bdc34233d9262b80</id>
<content type='text'>
commit 1f81b6d22a5980955b01e08cf27fb745dc9b686f upstream.

We have observed a rare cycle state desync bug after Set TR Dequeue
Pointer commands on Intel LynxPoint xHCs (resulting in an endpoint that
doesn't fetch new TRBs and thus an unresponsive USB device). It always
triggers when a previous Set TR Dequeue Pointer command has set the
pointer to the final Link TRB of a segment, and then another URB gets
enqueued and cancelled again before it can be completed. Further
investigation showed that the xHC had returned the Link TRB in the TRB
Pointer field of the Transfer Event (CC == Stopped -- Length Invalid),
but when xhci_find_new_dequeue_state() later accesses the Endpoint
Context's TR Dequeue Pointer field it is set to the first TRB of the
next segment.

The driver expects those two values to be the same in this situation,
and uses the cycle state of the latter together with the address of the
former. This should be fine according to the XHCI specification, since
the endpoint ring should be stopped when returning the Transfer Event
and thus should not advance over the Link TRB before it gets restarted.
However, real-world XHCI implementations apparently don't really care
that much about these details, so the driver should follow a more
defensive approach to try to work around HC spec violations.

This patch removes the stopped_trb variable that had been used to store
the TRB Pointer from the last Transfer Event of a stopped TRB. Instead,
xhci_find_new_dequeue_state() now relies only on the Endpoint Context,
requiring a small amount of additional processing to find the virtual
address corresponding to the TR Dequeue Pointer. Some other parts of the
function were slightly rearranged to better fit into this model.

This patch should be backported to kernels as old as 2.6.31 that contain
the commit ae636747146ea97efa18e04576acd3416e2514f5 "USB: xhci: URB
cancellation support."

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1f81b6d22a5980955b01e08cf27fb745dc9b686f upstream.

We have observed a rare cycle state desync bug after Set TR Dequeue
Pointer commands on Intel LynxPoint xHCs (resulting in an endpoint that
doesn't fetch new TRBs and thus an unresponsive USB device). It always
triggers when a previous Set TR Dequeue Pointer command has set the
pointer to the final Link TRB of a segment, and then another URB gets
enqueued and cancelled again before it can be completed. Further
investigation showed that the xHC had returned the Link TRB in the TRB
Pointer field of the Transfer Event (CC == Stopped -- Length Invalid),
but when xhci_find_new_dequeue_state() later accesses the Endpoint
Context's TR Dequeue Pointer field it is set to the first TRB of the
next segment.

The driver expects those two values to be the same in this situation,
and uses the cycle state of the latter together with the address of the
former. This should be fine according to the XHCI specification, since
the endpoint ring should be stopped when returning the Transfer Event
and thus should not advance over the Link TRB before it gets restarted.
However, real-world XHCI implementations apparently don't really care
that much about these details, so the driver should follow a more
defensive approach to try to work around HC spec violations.

This patch removes the stopped_trb variable that had been used to store
the TRB Pointer from the last Transfer Event of a stopped TRB. Instead,
xhci_find_new_dequeue_state() now relies only on the Endpoint Context,
requiring a small amount of additional processing to find the virtual
address corresponding to the TR Dequeue Pointer. Some other parts of the
function were slightly rearranged to better fit into this model.

This patch should be backported to kernels as old as 2.6.31 that contain
the commit ae636747146ea97efa18e04576acd3416e2514f5 "USB: xhci: URB
cancellation support."

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xhci: For streams the css flag most be read from the stream-ctx on ep stop</title>
<updated>2014-05-18T13:58:07+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2013-10-03T22:29:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8723390b1062a845b02aa4666a2b565773f673ad'/>
<id>8723390b1062a845b02aa4666a2b565773f673ad</id>
<content type='text'>
commit c4bedb77ec4cb42f37cae4cbfddda8283161f7c8 upstream.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c4bedb77ec4cb42f37cae4cbfddda8283161f7c8 upstream.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: fix sysfs-attribute removal deadlock</title>
<updated>2014-05-18T13:58:07+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2014-04-23T09:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27b34b28a13e98b2e61559afd00ae5d9d18c5e82'/>
<id>27b34b28a13e98b2e61559afd00ae5d9d18c5e82</id>
<content type='text'>
commit 10164c2ad6d2c16809f6c09e278f946e47801b3a upstream.

Fix driver new_id sysfs-attribute removal deadlock by making sure to
not hold any locks that the attribute operations grab when removing the
attribute.

Specifically, usb_serial_deregister holds the table mutex when
deregistering the driver, which includes removing the new_id attribute.
This can lead to a deadlock as writing to new_id increments the
attribute's active count before trying to grab the same mutex in
usb_serial_probe.

The deadlock can easily be triggered by inserting a sleep in
usb_serial_deregister and writing the id of an unbound device to new_id
during module unload.

As the table mutex (in this case) is used to prevent subdriver unload
during probe, it should be sufficient to only hold the lock while
manipulating the usb-serial driver list during deregister. A racing
probe will then either fail to find a matching subdriver or fail to get
the corresponding module reference.

Since v3.15-rc1 this also triggers the following lockdep warning:

======================================================
[ INFO: possible circular locking dependency detected ]
3.15.0-rc2 #123 Tainted: G        W
-------------------------------------------------------
modprobe/190 is trying to acquire lock:
 (s_active#4){++++.+}, at: [&lt;c0167aa0&gt;] kernfs_remove_by_name_ns+0x4c/0x94

but task is already holding lock:
 (table_lock){+.+.+.}, at: [&lt;bf004d84&gt;] usb_serial_deregister+0x3c/0x78 [usbserial]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (table_lock){+.+.+.}:
       [&lt;c0075f84&gt;] __lock_acquire+0x1694/0x1ce4
       [&lt;c0076de8&gt;] lock_acquire+0xb4/0x154
       [&lt;c03af3cc&gt;] _raw_spin_lock+0x4c/0x5c
       [&lt;c02bbc24&gt;] usb_store_new_id+0x14c/0x1ac
       [&lt;bf007eb4&gt;] new_id_store+0x68/0x70 [usbserial]
       [&lt;c025f568&gt;] drv_attr_store+0x30/0x3c
       [&lt;c01690e0&gt;] sysfs_kf_write+0x5c/0x60
       [&lt;c01682c0&gt;] kernfs_fop_write+0xd4/0x194
       [&lt;c010881c&gt;] vfs_write+0xbc/0x198
       [&lt;c0108e4c&gt;] SyS_write+0x4c/0xa0
       [&lt;c000f880&gt;] ret_fast_syscall+0x0/0x48

-&gt; #0 (s_active#4){++++.+}:
       [&lt;c03a7a28&gt;] print_circular_bug+0x68/0x2f8
       [&lt;c0076218&gt;] __lock_acquire+0x1928/0x1ce4
       [&lt;c0076de8&gt;] lock_acquire+0xb4/0x154
       [&lt;c0166b70&gt;] __kernfs_remove+0x254/0x310
       [&lt;c0167aa0&gt;] kernfs_remove_by_name_ns+0x4c/0x94
       [&lt;c0169fb8&gt;] remove_files.isra.1+0x48/0x84
       [&lt;c016a2fc&gt;] sysfs_remove_group+0x58/0xac
       [&lt;c016a414&gt;] sysfs_remove_groups+0x34/0x44
       [&lt;c02623b8&gt;] driver_remove_groups+0x1c/0x20
       [&lt;c0260e9c&gt;] bus_remove_driver+0x3c/0xe4
       [&lt;c026235c&gt;] driver_unregister+0x38/0x58
       [&lt;bf007fb4&gt;] usb_serial_bus_deregister+0x84/0x88 [usbserial]
       [&lt;bf004db4&gt;] usb_serial_deregister+0x6c/0x78 [usbserial]
       [&lt;bf005330&gt;] usb_serial_deregister_drivers+0x2c/0x4c [usbserial]
       [&lt;bf016618&gt;] usb_serial_module_exit+0x14/0x1c [sierra]
       [&lt;c009d6cc&gt;] SyS_delete_module+0x184/0x210
       [&lt;c000f880&gt;] ret_fast_syscall+0x0/0x48

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(table_lock);
                               lock(s_active#4);
                               lock(table_lock);
  lock(s_active#4);

 *** DEADLOCK ***

1 lock held by modprobe/190:
 #0:  (table_lock){+.+.+.}, at: [&lt;bf004d84&gt;] usb_serial_deregister+0x3c/0x78 [usbserial]

stack backtrace:
CPU: 0 PID: 190 Comm: modprobe Tainted: G        W     3.15.0-rc2 #123
[&lt;c0015e10&gt;] (unwind_backtrace) from [&lt;c0013728&gt;] (show_stack+0x20/0x24)
[&lt;c0013728&gt;] (show_stack) from [&lt;c03a9a54&gt;] (dump_stack+0x24/0x28)
[&lt;c03a9a54&gt;] (dump_stack) from [&lt;c03a7cac&gt;] (print_circular_bug+0x2ec/0x2f8)
[&lt;c03a7cac&gt;] (print_circular_bug) from [&lt;c0076218&gt;] (__lock_acquire+0x1928/0x1ce4)
[&lt;c0076218&gt;] (__lock_acquire) from [&lt;c0076de8&gt;] (lock_acquire+0xb4/0x154)
[&lt;c0076de8&gt;] (lock_acquire) from [&lt;c0166b70&gt;] (__kernfs_remove+0x254/0x310)
[&lt;c0166b70&gt;] (__kernfs_remove) from [&lt;c0167aa0&gt;] (kernfs_remove_by_name_ns+0x4c/0x94)
[&lt;c0167aa0&gt;] (kernfs_remove_by_name_ns) from [&lt;c0169fb8&gt;] (remove_files.isra.1+0x48/0x84)
[&lt;c0169fb8&gt;] (remove_files.isra.1) from [&lt;c016a2fc&gt;] (sysfs_remove_group+0x58/0xac)
[&lt;c016a2fc&gt;] (sysfs_remove_group) from [&lt;c016a414&gt;] (sysfs_remove_groups+0x34/0x44)
[&lt;c016a414&gt;] (sysfs_remove_groups) from [&lt;c02623b8&gt;] (driver_remove_groups+0x1c/0x20)
[&lt;c02623b8&gt;] (driver_remove_groups) from [&lt;c0260e9c&gt;] (bus_remove_driver+0x3c/0xe4)
[&lt;c0260e9c&gt;] (bus_remove_driver) from [&lt;c026235c&gt;] (driver_unregister+0x38/0x58)
[&lt;c026235c&gt;] (driver_unregister) from [&lt;bf007fb4&gt;] (usb_serial_bus_deregister+0x84/0x88 [usbserial])
[&lt;bf007fb4&gt;] (usb_serial_bus_deregister [usbserial]) from [&lt;bf004db4&gt;] (usb_serial_deregister+0x6c/0x78 [usbserial])
[&lt;bf004db4&gt;] (usb_serial_deregister [usbserial]) from [&lt;bf005330&gt;] (usb_serial_deregister_drivers+0x2c/0x4c [usbserial])
[&lt;bf005330&gt;] (usb_serial_deregister_drivers [usbserial]) from [&lt;bf016618&gt;] (usb_serial_module_exit+0x14/0x1c [sierra])
[&lt;bf016618&gt;] (usb_serial_module_exit [sierra]) from [&lt;c009d6cc&gt;] (SyS_delete_module+0x184/0x210)
[&lt;c009d6cc&gt;] (SyS_delete_module) from [&lt;c000f880&gt;] (ret_fast_syscall+0x0/0x48)

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 10164c2ad6d2c16809f6c09e278f946e47801b3a upstream.

Fix driver new_id sysfs-attribute removal deadlock by making sure to
not hold any locks that the attribute operations grab when removing the
attribute.

Specifically, usb_serial_deregister holds the table mutex when
deregistering the driver, which includes removing the new_id attribute.
This can lead to a deadlock as writing to new_id increments the
attribute's active count before trying to grab the same mutex in
usb_serial_probe.

The deadlock can easily be triggered by inserting a sleep in
usb_serial_deregister and writing the id of an unbound device to new_id
during module unload.

As the table mutex (in this case) is used to prevent subdriver unload
during probe, it should be sufficient to only hold the lock while
manipulating the usb-serial driver list during deregister. A racing
probe will then either fail to find a matching subdriver or fail to get
the corresponding module reference.

Since v3.15-rc1 this also triggers the following lockdep warning:

======================================================
[ INFO: possible circular locking dependency detected ]
3.15.0-rc2 #123 Tainted: G        W
-------------------------------------------------------
modprobe/190 is trying to acquire lock:
 (s_active#4){++++.+}, at: [&lt;c0167aa0&gt;] kernfs_remove_by_name_ns+0x4c/0x94

but task is already holding lock:
 (table_lock){+.+.+.}, at: [&lt;bf004d84&gt;] usb_serial_deregister+0x3c/0x78 [usbserial]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (table_lock){+.+.+.}:
       [&lt;c0075f84&gt;] __lock_acquire+0x1694/0x1ce4
       [&lt;c0076de8&gt;] lock_acquire+0xb4/0x154
       [&lt;c03af3cc&gt;] _raw_spin_lock+0x4c/0x5c
       [&lt;c02bbc24&gt;] usb_store_new_id+0x14c/0x1ac
       [&lt;bf007eb4&gt;] new_id_store+0x68/0x70 [usbserial]
       [&lt;c025f568&gt;] drv_attr_store+0x30/0x3c
       [&lt;c01690e0&gt;] sysfs_kf_write+0x5c/0x60
       [&lt;c01682c0&gt;] kernfs_fop_write+0xd4/0x194
       [&lt;c010881c&gt;] vfs_write+0xbc/0x198
       [&lt;c0108e4c&gt;] SyS_write+0x4c/0xa0
       [&lt;c000f880&gt;] ret_fast_syscall+0x0/0x48

-&gt; #0 (s_active#4){++++.+}:
       [&lt;c03a7a28&gt;] print_circular_bug+0x68/0x2f8
       [&lt;c0076218&gt;] __lock_acquire+0x1928/0x1ce4
       [&lt;c0076de8&gt;] lock_acquire+0xb4/0x154
       [&lt;c0166b70&gt;] __kernfs_remove+0x254/0x310
       [&lt;c0167aa0&gt;] kernfs_remove_by_name_ns+0x4c/0x94
       [&lt;c0169fb8&gt;] remove_files.isra.1+0x48/0x84
       [&lt;c016a2fc&gt;] sysfs_remove_group+0x58/0xac
       [&lt;c016a414&gt;] sysfs_remove_groups+0x34/0x44
       [&lt;c02623b8&gt;] driver_remove_groups+0x1c/0x20
       [&lt;c0260e9c&gt;] bus_remove_driver+0x3c/0xe4
       [&lt;c026235c&gt;] driver_unregister+0x38/0x58
       [&lt;bf007fb4&gt;] usb_serial_bus_deregister+0x84/0x88 [usbserial]
       [&lt;bf004db4&gt;] usb_serial_deregister+0x6c/0x78 [usbserial]
       [&lt;bf005330&gt;] usb_serial_deregister_drivers+0x2c/0x4c [usbserial]
       [&lt;bf016618&gt;] usb_serial_module_exit+0x14/0x1c [sierra]
       [&lt;c009d6cc&gt;] SyS_delete_module+0x184/0x210
       [&lt;c000f880&gt;] ret_fast_syscall+0x0/0x48

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(table_lock);
                               lock(s_active#4);
                               lock(table_lock);
  lock(s_active#4);

 *** DEADLOCK ***

1 lock held by modprobe/190:
 #0:  (table_lock){+.+.+.}, at: [&lt;bf004d84&gt;] usb_serial_deregister+0x3c/0x78 [usbserial]

stack backtrace:
CPU: 0 PID: 190 Comm: modprobe Tainted: G        W     3.15.0-rc2 #123
[&lt;c0015e10&gt;] (unwind_backtrace) from [&lt;c0013728&gt;] (show_stack+0x20/0x24)
[&lt;c0013728&gt;] (show_stack) from [&lt;c03a9a54&gt;] (dump_stack+0x24/0x28)
[&lt;c03a9a54&gt;] (dump_stack) from [&lt;c03a7cac&gt;] (print_circular_bug+0x2ec/0x2f8)
[&lt;c03a7cac&gt;] (print_circular_bug) from [&lt;c0076218&gt;] (__lock_acquire+0x1928/0x1ce4)
[&lt;c0076218&gt;] (__lock_acquire) from [&lt;c0076de8&gt;] (lock_acquire+0xb4/0x154)
[&lt;c0076de8&gt;] (lock_acquire) from [&lt;c0166b70&gt;] (__kernfs_remove+0x254/0x310)
[&lt;c0166b70&gt;] (__kernfs_remove) from [&lt;c0167aa0&gt;] (kernfs_remove_by_name_ns+0x4c/0x94)
[&lt;c0167aa0&gt;] (kernfs_remove_by_name_ns) from [&lt;c0169fb8&gt;] (remove_files.isra.1+0x48/0x84)
[&lt;c0169fb8&gt;] (remove_files.isra.1) from [&lt;c016a2fc&gt;] (sysfs_remove_group+0x58/0xac)
[&lt;c016a2fc&gt;] (sysfs_remove_group) from [&lt;c016a414&gt;] (sysfs_remove_groups+0x34/0x44)
[&lt;c016a414&gt;] (sysfs_remove_groups) from [&lt;c02623b8&gt;] (driver_remove_groups+0x1c/0x20)
[&lt;c02623b8&gt;] (driver_remove_groups) from [&lt;c0260e9c&gt;] (bus_remove_driver+0x3c/0xe4)
[&lt;c0260e9c&gt;] (bus_remove_driver) from [&lt;c026235c&gt;] (driver_unregister+0x38/0x58)
[&lt;c026235c&gt;] (driver_unregister) from [&lt;bf007fb4&gt;] (usb_serial_bus_deregister+0x84/0x88 [usbserial])
[&lt;bf007fb4&gt;] (usb_serial_bus_deregister [usbserial]) from [&lt;bf004db4&gt;] (usb_serial_deregister+0x6c/0x78 [usbserial])
[&lt;bf004db4&gt;] (usb_serial_deregister [usbserial]) from [&lt;bf005330&gt;] (usb_serial_deregister_drivers+0x2c/0x4c [usbserial])
[&lt;bf005330&gt;] (usb_serial_deregister_drivers [usbserial]) from [&lt;bf016618&gt;] (usb_serial_module_exit+0x14/0x1c [sierra])
[&lt;bf016618&gt;] (usb_serial_module_exit [sierra]) from [&lt;c009d6cc&gt;] (SyS_delete_module+0x184/0x210)
[&lt;c009d6cc&gt;] (SyS_delete_module) from [&lt;c000f880&gt;] (ret_fast_syscall+0x0/0x48)

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: cdc-acm: Remove Motorola/Telit H24 serial interfaces from ACM driver</title>
<updated>2014-05-18T13:58:05+00:00</updated>
<author>
<name>Michael Ulbricht</name>
<email>michael.ulbricht@systec-electronic.com</email>
</author>
<published>2014-03-25T09:34:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d71d4e468519901c84933d1c627f96626d5d023'/>
<id>0d71d4e468519901c84933d1c627f96626d5d023</id>
<content type='text'>
commit 895d240d1db0b2736d779200788e4c4aea28a0c6 upstream.

By specifying NO_UNION_NORMAL the ACM driver does only use the first two
USB interfaces (modem data &amp; control). The AT Port, Diagnostic and NMEA
interfaces are left to the USB serial driver.

Signed-off-by: Michael Ulbricht &lt;michael.ulbricht@systec-electronic.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 895d240d1db0b2736d779200788e4c4aea28a0c6 upstream.

By specifying NO_UNION_NORMAL the ACM driver does only use the first two
USB interfaces (modem data &amp; control). The AT Port, Diagnostic and NMEA
interfaces are left to the USB serial driver.

Signed-off-by: Michael Ulbricht &lt;michael.ulbricht@systec-electronic.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: pl2303: add ids for Hewlett-Packard HP POS pole displays</title>
<updated>2014-05-18T13:58:05+00:00</updated>
<author>
<name>Aaron Sanders</name>
<email>aaron.sanders@hp.com</email>
</author>
<published>2014-03-31T13:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9296342c21dafefa83f2dade1edd102dce88b556'/>
<id>9296342c21dafefa83f2dade1edd102dce88b556</id>
<content type='text'>
commit b16c02fbfb963fa2941b7517ebf1f8a21946775e upstream.

Add device ids to pl2303 for the Hewlett-Packard HP POS pole displays:

LD960: 03f0:0B39
LCM220: 03f0:3139
LCM960: 03f0:3239

[ Johan: fix indentation and sort PIDs numerically ]

Signed-off-by: Aaron Sanders &lt;aaron.sanders@hp.com&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b16c02fbfb963fa2941b7517ebf1f8a21946775e upstream.

Add device ids to pl2303 for the Hewlett-Packard HP POS pole displays:

LD960: 03f0:0B39
LCM220: 03f0:3139
LCM960: 03f0:3239

[ Johan: fix indentation and sort PIDs numerically ]

Signed-off-by: Aaron Sanders &lt;aaron.sanders@hp.com&gt;
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
