<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/core, branch v3.0.75</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: fix endpoint-disabling for failed config changes</title>
<updated>2013-01-21T19:44:59+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-11-07T15:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b436f48a31692bc41b9d049dec23cf55714d70d5'/>
<id>b436f48a31692bc41b9d049dec23cf55714d70d5</id>
<content type='text'>
commit 36caff5d795429c572443894e8789c2150dd796b upstream.

This patch (as1631) fixes a bug that shows up when a config change
fails for a device under an xHCI controller.  The controller needs to
be told to disable the endpoints that have been enabled for the new
config.  The existing code does this, but before storing the
information about which endpoints were enabled!  As a result, any
second attempt to install the new config is doomed to fail because
xhci-hcd will refuse to enable an endpoint that is already enabled.

The patch optimistically initializes the new endpoints' device
structures before asking the device to switch to the new config.  If
the request fails then the endpoint information is already stored, so
we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no
trouble.  The rest of the error path is slightly more complex now; we
have to disable the new interfaces and call put_device() rather than
simply deallocating them.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Matthias Schniedermeyer &lt;ms@citd.de&gt;
CC: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: CAI Qian &lt;caiqian@redhat.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 36caff5d795429c572443894e8789c2150dd796b upstream.

This patch (as1631) fixes a bug that shows up when a config change
fails for a device under an xHCI controller.  The controller needs to
be told to disable the endpoints that have been enabled for the new
config.  The existing code does this, but before storing the
information about which endpoints were enabled!  As a result, any
second attempt to install the new config is doomed to fail because
xhci-hcd will refuse to enable an endpoint that is already enabled.

The patch optimistically initializes the new endpoints' device
structures before asking the device to switch to the new config.  If
the request fails then the endpoint information is already stored, so
we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no
trouble.  The rest of the error path is slightly more complex now; we
have to disable the new interfaces and call put_device() rather than
simply deallocating them.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Matthias Schniedermeyer &lt;ms@citd.de&gt;
CC: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: CAI Qian &lt;caiqian@redhat.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: hub: handle claim of enabled remote wakeup after reset</title>
<updated>2013-01-17T16:44:12+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2012-11-29T14:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b30765e89105c321ed5a5259dc6b05752cbc8137'/>
<id>b30765e89105c321ed5a5259dc6b05752cbc8137</id>
<content type='text'>
commit 07e72b95f5038cc82304b9a4a2eb7f9fc391ea68 upstream.

Some touchscreens have buggy firmware which claims
remote wakeup to be enabled after a reset. They nevertheless
crash if the feature is cleared by the host.
Add a check for reset resume before checking for
an enabled remote wakeup feature. On compliant
devices the feature must be cleared after a reset anyway.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 07e72b95f5038cc82304b9a4a2eb7f9fc391ea68 upstream.

Some touchscreens have buggy firmware which claims
remote wakeup to be enabled after a reset. They nevertheless
crash if the feature is cleared by the host.
Add a check for reset resume before checking for
an enabled remote wakeup feature. On compliant
devices the feature must be cleared after a reset anyway.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Increase reset timeout.</title>
<updated>2013-01-17T16:44:12+00:00</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-11-15T01:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e16e202710af9cc74b01c60ea1e338e3e954e6ed'/>
<id>e16e202710af9cc74b01c60ea1e338e3e954e6ed</id>
<content type='text'>
commit 77c7f072c87fa951e9a74805febf26466f31170c upstream.

John's NEC 0.96 xHCI host controller needs a longer timeout for a warm
reset to complete.  The logs show it takes 650ms to complete the warm
reset, so extend the hub reset timeout to 800ms to be on the safe side.

This commit should be backported to kernels as old as 3.2, that contain
the commit 75d7cf72ab9fa01dc70877aa5c68e8ef477229dc "usbcore: refine
warm reset logic".

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: John Covici &lt;covici@ccs.covici.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 77c7f072c87fa951e9a74805febf26466f31170c upstream.

John's NEC 0.96 xHCI host controller needs a longer timeout for a warm
reset to complete.  The logs show it takes 650ms to complete the warm
reset, so extend the hub reset timeout to 800ms to be on the safe side.

This commit should be backported to kernels as old as 3.2, that contain
the commit 75d7cf72ab9fa01dc70877aa5c68e8ef477229dc "usbcore: refine
warm reset logic".

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: John Covici &lt;covici@ccs.covici.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb hub: send clear_tt_buffer_complete events when canceling TT clear work</title>
<updated>2012-10-31T16:51:35+00:00</updated>
<author>
<name>Octavian Purdila</name>
<email>octavian.purdila@intel.com</email>
</author>
<published>2012-10-01T19:21:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=974ee86a47395138c0def2639686d02e4a8af34c'/>
<id>974ee86a47395138c0def2639686d02e4a8af34c</id>
<content type='text'>
commit 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c upstream.

There is a race condition in the USB hub code with regard to handling
TT clear requests that can get the HCD driver in a deadlock. Usually
when an TT clear request is scheduled it will be executed immediately:

&lt;7&gt;[    6.077583] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;3&gt;[    6.078041] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
&lt;7&gt;[    6.078299] hub_tt_work:731
&lt;7&gt;[    9.309089] usb 2-1.5: link qh1-0e01/f4d506c0 start 0 [1/2 us]
&lt;7&gt;[    9.324526] ehci_hcd 0000:00:1d.0: reused qh f4d4db00 schedule
&lt;7&gt;[    9.324539] usb 2-1.3: link qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;7&gt;[    9.341530] usb 1-1.1: link qh4-0e01/f397aec0 start 2 [1/2 us]
&lt;7&gt;[   10.116159] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;3&gt;[   10.116459] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
&lt;7&gt;[   10.116537] hub_tt_work:731

However, if a suspend operation is triggered before hub_tt_work is
scheduled, hub_quiesce will cancel the work without notifying the HCD
driver:

&lt;3&gt;[   35.033941] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d80
&lt;5&gt;[   35.034022] sd 0:0:0:0: [sda] Stopping disk
&lt;7&gt;[   35.034039] hub 2-1:1.0: hub_suspend
&lt;7&gt;[   35.034067] usb 2-1: unlink qh256-0001/f3b1ab00 start 1 [1/0 us]
&lt;7&gt;[   35.035085] hub 1-0:1.0: hub_suspend
&lt;7&gt;[   35.035102] usb usb1: bus suspend, wakeup 0
&lt;7&gt;[   35.035106] ehci_hcd 0000:00:1a.0: suspend root hub
&lt;7&gt;[   35.035298] hub 2-0:1.0: hub_suspend
&lt;7&gt;[   35.035313] usb usb2: bus suspend, wakeup 0
&lt;7&gt;[   35.035315] ehci_hcd 0000:00:1d.0: suspend root hub
&lt;6&gt;[   35.250017] PM: suspend of devices complete after 216.979 msecs
&lt;6&gt;[   35.250822] PM: late suspend of devices complete after 0.799 msecs
&lt;7&gt;[   35.252343] ehci_hcd 0000:00:1d.0: wakeup: 1
&lt;7&gt;[   35.262923] ehci_hcd 0000:00:1d.0: --&gt; PCI D3hot
&lt;7&gt;[   35.263302] ehci_hcd 0000:00:1a.0: wakeup: 1
&lt;7&gt;[   35.273912] ehci_hcd 0000:00:1a.0: --&gt; PCI D3hot
&lt;6&gt;[   35.274254] PM: noirq suspend of devices complete after 23.442 msecs
&lt;6&gt;[   35.274975] ACPI: Preparing to enter system sleep state S3
&lt;6&gt;[   35.292666] PM: Saving platform NVS memory
&lt;7&gt;[   35.295030] Disabling non-boot CPUs ...
&lt;6&gt;[   35.297351] CPU 1 is now offline
&lt;6&gt;[   35.300345] CPU 2 is now offline
&lt;6&gt;[   35.303929] CPU 3 is now offline
&lt;7&gt;[   35.303931] lockdep: fixing up alternatives.
&lt;6&gt;[   35.304825] Extended CMOS year: 2000

When the device will resume the EHCI driver will get stuck in
ehci_endpoint_disable waiting for the tt_clearing flag to reset:

&lt;0&gt;[   47.610967] usb 2-1.3: **** DPM device timeout ****
&lt;7&gt;[   47.610972]  f2f11c60 00000092 f2f11c0c c10624a5 00000003 f4c6e880 c1c8a4c0 c1c8a4c0
&lt;7&gt;[   47.610983]  15c55698 0000000b f56b34c0 f2a45b70 f4c6e880 00000082 f2a4602c f2f11c30
&lt;7&gt;[   47.610993]  c10787f8 f4cac000 f2a45b70 00000000 f4cac010 f2f11c58 00000046 00000001
&lt;7&gt;[   47.611004] Call Trace:
&lt;7&gt;[   47.611006]  [&lt;c10624a5&gt;] ? sched_clock_cpu+0xf5/0x160
&lt;7&gt;[   47.611019]  [&lt;c10787f8&gt;] ? lock_release_holdtime.part.22+0x88/0xf0
&lt;7&gt;[   47.611026]  [&lt;c103ed46&gt;] ? lock_timer_base.isra.35+0x26/0x50
&lt;7&gt;[   47.611034]  [&lt;c17592d3&gt;] ? schedule_timeout+0x133/0x290
&lt;7&gt;[   47.611044]  [&lt;c175b43e&gt;] schedule+0x1e/0x50
&lt;7&gt;[   47.611051]  [&lt;c17592d8&gt;] schedule_timeout+0x138/0x290
&lt;7&gt;[   47.611057]  [&lt;c10624a5&gt;] ? sched_clock_cpu+0xf5/0x160
&lt;7&gt;[   47.611063]  [&lt;c103e560&gt;] ? usleep_range+0x40/0x40
&lt;7&gt;[   47.611070]  [&lt;c1759445&gt;] schedule_timeout_uninterruptible+0x15/0x20
&lt;7&gt;[   47.611077]  [&lt;c14935f4&gt;] ehci_endpoint_disable+0x64/0x160
&lt;7&gt;[   47.611084]  [&lt;c147d1ee&gt;] ? usb_hcd_flush_endpoint+0x10e/0x1d0
&lt;7&gt;[   47.611092]  [&lt;c1165663&gt;] ? sysfs_add_file+0x13/0x20
&lt;7&gt;[   47.611100]  [&lt;c147d5a9&gt;] usb_hcd_disable_endpoint+0x29/0x40
&lt;7&gt;[   47.611107]  [&lt;c147fafc&gt;] usb_disable_endpoint+0x5c/0x80
&lt;7&gt;[   47.611111]  [&lt;c147fb57&gt;] usb_disable_interface+0x37/0x50
&lt;7&gt;[   47.611116]  [&lt;c1477650&gt;] usb_reset_and_verify_device+0x4b0/0x640
&lt;7&gt;[   47.611122]  [&lt;c1474665&gt;] ? hub_port_status+0xb5/0x100
&lt;7&gt;[   47.611129]  [&lt;c147a975&gt;] usb_port_resume+0xd5/0x220
&lt;7&gt;[   47.611136]  [&lt;c148877f&gt;] generic_resume+0xf/0x30
&lt;7&gt;[   47.611142]  [&lt;c14821a3&gt;] usb_resume+0x133/0x180
&lt;7&gt;[   47.611147]  [&lt;c1473b10&gt;] ? usb_dev_thaw+0x10/0x10
&lt;7&gt;[   47.611152]  [&lt;c1473b1d&gt;] usb_dev_resume+0xd/0x10
&lt;7&gt;[   47.611157]  [&lt;c13baa60&gt;] dpm_run_callback+0x40/0xb0
&lt;7&gt;[   47.611164]  [&lt;c13bdb03&gt;] ? pm_runtime_enable+0x43/0x70
&lt;7&gt;[   47.611171]  [&lt;c13bafc6&gt;] device_resume+0x1a6/0x2c0
&lt;7&gt;[   47.611177]  [&lt;c13ba940&gt;] ? dpm_show_time+0xe0/0xe0
&lt;7&gt;[   47.611183]  [&lt;c13bb0f9&gt;] async_resume+0x19/0x40
&lt;7&gt;[   47.611189]  [&lt;c10580c4&gt;] async_run_entry_fn+0x64/0x160
&lt;7&gt;[   47.611196]  [&lt;c104a244&gt;] ? process_one_work+0x104/0x480
&lt;7&gt;[   47.611203]  [&lt;c104a24c&gt;] ? process_one_work+0x10c/0x480
&lt;7&gt;[   47.611209]  [&lt;c104a2c0&gt;] process_one_work+0x180/0x480
&lt;7&gt;[   47.611215]  [&lt;c104a244&gt;] ? process_one_work+0x104/0x480
&lt;7&gt;[   47.611220]  [&lt;c1058060&gt;] ? async_schedule+0x10/0x10
&lt;7&gt;[   47.611226]  [&lt;c104c15c&gt;] worker_thread+0x11c/0x2f0
&lt;7&gt;[   47.611233]  [&lt;c104c040&gt;] ? manage_workers.isra.27+0x1f0/0x1f0
&lt;7&gt;[   47.611239]  [&lt;c10507f8&gt;] kthread+0x78/0x80
&lt;7&gt;[   47.611244]  [&lt;c1750000&gt;] ? timer_cpu_notify+0xd6/0x20d
&lt;7&gt;[   47.611253]  [&lt;c1050780&gt;] ? __init_kthread_worker+0x60/0x60
&lt;7&gt;[   47.611258]  [&lt;c176357e&gt;] kernel_thread_helper+0x6/0xd
&lt;7&gt;[   47.611283] ------------[ cut here ]------------

This patch changes hub_quiesce behavior to flush the TT clear work
instead of canceling it, to make sure that no TT clear request remains
uncompleted before suspend.

Signed-off-by: Octavian Purdila &lt;octavian.purdila@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c upstream.

There is a race condition in the USB hub code with regard to handling
TT clear requests that can get the HCD driver in a deadlock. Usually
when an TT clear request is scheduled it will be executed immediately:

&lt;7&gt;[    6.077583] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;3&gt;[    6.078041] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
&lt;7&gt;[    6.078299] hub_tt_work:731
&lt;7&gt;[    9.309089] usb 2-1.5: link qh1-0e01/f4d506c0 start 0 [1/2 us]
&lt;7&gt;[    9.324526] ehci_hcd 0000:00:1d.0: reused qh f4d4db00 schedule
&lt;7&gt;[    9.324539] usb 2-1.3: link qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;7&gt;[    9.341530] usb 1-1.1: link qh4-0e01/f397aec0 start 2 [1/2 us]
&lt;7&gt;[   10.116159] usb 2-1.3: unlink qh1-0e01/f4d4db00 start 0 [1/2 us]
&lt;3&gt;[   10.116459] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d82
&lt;7&gt;[   10.116537] hub_tt_work:731

However, if a suspend operation is triggered before hub_tt_work is
scheduled, hub_quiesce will cancel the work without notifying the HCD
driver:

&lt;3&gt;[   35.033941] usb 2-1: clear tt buffer port 3, a3 ep2 t04048d80
&lt;5&gt;[   35.034022] sd 0:0:0:0: [sda] Stopping disk
&lt;7&gt;[   35.034039] hub 2-1:1.0: hub_suspend
&lt;7&gt;[   35.034067] usb 2-1: unlink qh256-0001/f3b1ab00 start 1 [1/0 us]
&lt;7&gt;[   35.035085] hub 1-0:1.0: hub_suspend
&lt;7&gt;[   35.035102] usb usb1: bus suspend, wakeup 0
&lt;7&gt;[   35.035106] ehci_hcd 0000:00:1a.0: suspend root hub
&lt;7&gt;[   35.035298] hub 2-0:1.0: hub_suspend
&lt;7&gt;[   35.035313] usb usb2: bus suspend, wakeup 0
&lt;7&gt;[   35.035315] ehci_hcd 0000:00:1d.0: suspend root hub
&lt;6&gt;[   35.250017] PM: suspend of devices complete after 216.979 msecs
&lt;6&gt;[   35.250822] PM: late suspend of devices complete after 0.799 msecs
&lt;7&gt;[   35.252343] ehci_hcd 0000:00:1d.0: wakeup: 1
&lt;7&gt;[   35.262923] ehci_hcd 0000:00:1d.0: --&gt; PCI D3hot
&lt;7&gt;[   35.263302] ehci_hcd 0000:00:1a.0: wakeup: 1
&lt;7&gt;[   35.273912] ehci_hcd 0000:00:1a.0: --&gt; PCI D3hot
&lt;6&gt;[   35.274254] PM: noirq suspend of devices complete after 23.442 msecs
&lt;6&gt;[   35.274975] ACPI: Preparing to enter system sleep state S3
&lt;6&gt;[   35.292666] PM: Saving platform NVS memory
&lt;7&gt;[   35.295030] Disabling non-boot CPUs ...
&lt;6&gt;[   35.297351] CPU 1 is now offline
&lt;6&gt;[   35.300345] CPU 2 is now offline
&lt;6&gt;[   35.303929] CPU 3 is now offline
&lt;7&gt;[   35.303931] lockdep: fixing up alternatives.
&lt;6&gt;[   35.304825] Extended CMOS year: 2000

When the device will resume the EHCI driver will get stuck in
ehci_endpoint_disable waiting for the tt_clearing flag to reset:

&lt;0&gt;[   47.610967] usb 2-1.3: **** DPM device timeout ****
&lt;7&gt;[   47.610972]  f2f11c60 00000092 f2f11c0c c10624a5 00000003 f4c6e880 c1c8a4c0 c1c8a4c0
&lt;7&gt;[   47.610983]  15c55698 0000000b f56b34c0 f2a45b70 f4c6e880 00000082 f2a4602c f2f11c30
&lt;7&gt;[   47.610993]  c10787f8 f4cac000 f2a45b70 00000000 f4cac010 f2f11c58 00000046 00000001
&lt;7&gt;[   47.611004] Call Trace:
&lt;7&gt;[   47.611006]  [&lt;c10624a5&gt;] ? sched_clock_cpu+0xf5/0x160
&lt;7&gt;[   47.611019]  [&lt;c10787f8&gt;] ? lock_release_holdtime.part.22+0x88/0xf0
&lt;7&gt;[   47.611026]  [&lt;c103ed46&gt;] ? lock_timer_base.isra.35+0x26/0x50
&lt;7&gt;[   47.611034]  [&lt;c17592d3&gt;] ? schedule_timeout+0x133/0x290
&lt;7&gt;[   47.611044]  [&lt;c175b43e&gt;] schedule+0x1e/0x50
&lt;7&gt;[   47.611051]  [&lt;c17592d8&gt;] schedule_timeout+0x138/0x290
&lt;7&gt;[   47.611057]  [&lt;c10624a5&gt;] ? sched_clock_cpu+0xf5/0x160
&lt;7&gt;[   47.611063]  [&lt;c103e560&gt;] ? usleep_range+0x40/0x40
&lt;7&gt;[   47.611070]  [&lt;c1759445&gt;] schedule_timeout_uninterruptible+0x15/0x20
&lt;7&gt;[   47.611077]  [&lt;c14935f4&gt;] ehci_endpoint_disable+0x64/0x160
&lt;7&gt;[   47.611084]  [&lt;c147d1ee&gt;] ? usb_hcd_flush_endpoint+0x10e/0x1d0
&lt;7&gt;[   47.611092]  [&lt;c1165663&gt;] ? sysfs_add_file+0x13/0x20
&lt;7&gt;[   47.611100]  [&lt;c147d5a9&gt;] usb_hcd_disable_endpoint+0x29/0x40
&lt;7&gt;[   47.611107]  [&lt;c147fafc&gt;] usb_disable_endpoint+0x5c/0x80
&lt;7&gt;[   47.611111]  [&lt;c147fb57&gt;] usb_disable_interface+0x37/0x50
&lt;7&gt;[   47.611116]  [&lt;c1477650&gt;] usb_reset_and_verify_device+0x4b0/0x640
&lt;7&gt;[   47.611122]  [&lt;c1474665&gt;] ? hub_port_status+0xb5/0x100
&lt;7&gt;[   47.611129]  [&lt;c147a975&gt;] usb_port_resume+0xd5/0x220
&lt;7&gt;[   47.611136]  [&lt;c148877f&gt;] generic_resume+0xf/0x30
&lt;7&gt;[   47.611142]  [&lt;c14821a3&gt;] usb_resume+0x133/0x180
&lt;7&gt;[   47.611147]  [&lt;c1473b10&gt;] ? usb_dev_thaw+0x10/0x10
&lt;7&gt;[   47.611152]  [&lt;c1473b1d&gt;] usb_dev_resume+0xd/0x10
&lt;7&gt;[   47.611157]  [&lt;c13baa60&gt;] dpm_run_callback+0x40/0xb0
&lt;7&gt;[   47.611164]  [&lt;c13bdb03&gt;] ? pm_runtime_enable+0x43/0x70
&lt;7&gt;[   47.611171]  [&lt;c13bafc6&gt;] device_resume+0x1a6/0x2c0
&lt;7&gt;[   47.611177]  [&lt;c13ba940&gt;] ? dpm_show_time+0xe0/0xe0
&lt;7&gt;[   47.611183]  [&lt;c13bb0f9&gt;] async_resume+0x19/0x40
&lt;7&gt;[   47.611189]  [&lt;c10580c4&gt;] async_run_entry_fn+0x64/0x160
&lt;7&gt;[   47.611196]  [&lt;c104a244&gt;] ? process_one_work+0x104/0x480
&lt;7&gt;[   47.611203]  [&lt;c104a24c&gt;] ? process_one_work+0x10c/0x480
&lt;7&gt;[   47.611209]  [&lt;c104a2c0&gt;] process_one_work+0x180/0x480
&lt;7&gt;[   47.611215]  [&lt;c104a244&gt;] ? process_one_work+0x104/0x480
&lt;7&gt;[   47.611220]  [&lt;c1058060&gt;] ? async_schedule+0x10/0x10
&lt;7&gt;[   47.611226]  [&lt;c104c15c&gt;] worker_thread+0x11c/0x2f0
&lt;7&gt;[   47.611233]  [&lt;c104c040&gt;] ? manage_workers.isra.27+0x1f0/0x1f0
&lt;7&gt;[   47.611239]  [&lt;c10507f8&gt;] kthread+0x78/0x80
&lt;7&gt;[   47.611244]  [&lt;c1750000&gt;] ? timer_cpu_notify+0xd6/0x20d
&lt;7&gt;[   47.611253]  [&lt;c1050780&gt;] ? __init_kthread_worker+0x60/0x60
&lt;7&gt;[   47.611258]  [&lt;c176357e&gt;] kernel_thread_helper+0x6/0xd
&lt;7&gt;[   47.611283] ------------[ cut here ]------------

This patch changes hub_quiesce behavior to flush the TT clear work
instead of canceling it, to make sure that no TT clear request remains
uncompleted before suspend.

Signed-off-by: Octavian Purdila &lt;octavian.purdila@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Fix race condition when removing host controllers</title>
<updated>2012-10-02T16:47:55+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-09-26T17:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b15ab4ac6ae748d3552b0cb112dff5c9c567d4ca'/>
<id>b15ab4ac6ae748d3552b0cb112dff5c9c567d4ca</id>
<content type='text'>
commit 0d00dc2611abbe6ad244d50569c2ee82ce42846c upstream.

This patch (as1607) fixes a race that can occur if a USB host
controller is removed while a process is reading the
/sys/kernel/debug/usb/devices file.

The usb_device_read() routine uses the bus-&gt;root_hub pointer to
determine whether or not the root hub is registered.  The is not a
valid test, because the pointer is set before the root hub gets
registered and remains set even after the root hub is unregistered and
deallocated.  As a result, usb_device_read() or usb_device_dump() can
access freed memory, causing an oops.

The patch changes the test to use the hcd-&gt;rh_registered flag, which
does get set and cleared at the appropriate times.  It also makes sure
to hold the usb_bus_list_lock mutex while setting the flag, so that
usb_device_read() will become aware of new root hubs as soon as they
are registered.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0d00dc2611abbe6ad244d50569c2ee82ce42846c upstream.

This patch (as1607) fixes a race that can occur if a USB host
controller is removed while a process is reading the
/sys/kernel/debug/usb/devices file.

The usb_device_read() routine uses the bus-&gt;root_hub pointer to
determine whether or not the root hub is registered.  The is not a
valid test, because the pointer is set before the root hub gets
registered and remains set even after the root hub is unregistered and
deallocated.  As a result, usb_device_read() or usb_device_dump() can
access freed memory, causing an oops.

The patch changes the test to use the hcd-&gt;rh_registered flag, which
does get set and cleared at the appropriate times.  It also makes sure
to hold the usb_bus_list_lock mutex while setting the flag, so that
usb_device_read() will become aware of new root hubs as soon as they
are registered.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: add device quirk for Joss Optical touchboard</title>
<updated>2012-10-02T16:47:38+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-09-04T14:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d515ad3c27b2f41a0f2b29af61bb8cc131345782'/>
<id>d515ad3c27b2f41a0f2b29af61bb8cc131345782</id>
<content type='text'>
commit 92fc7a8b0f20bdb243c706daf42658e8e0cd2ef0 upstream.

This patch (as1604) adds a CONFIG_INTF_STRINGS quirk for the Joss
infrared touchboard device.  The device doesn't like to be asked for
its interface strings.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: adam ? &lt;adam3337@wp.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 92fc7a8b0f20bdb243c706daf42658e8e0cd2ef0 upstream.

This patch (as1604) adds a CONFIG_INTF_STRINGS quirk for the Joss
infrared touchboard device.  The device doesn't like to be asked for
its interface strings.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: adam ? &lt;adam3337@wp.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: feed USB device information to the /dev/random driver</title>
<updated>2012-08-15T19:04:12+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-07-04T15:22:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52d1114f461ad4d33d8bc38987b5991161712e96'/>
<id>52d1114f461ad4d33d8bc38987b5991161712e96</id>
<content type='text'>
commit b04b3156a20d395a7faa8eed98698d1e17a36000 upstream.

Send the USB device's serial, product, and manufacturer strings to the
/dev/random driver to help seed its pools.

Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b04b3156a20d395a7faa8eed98698d1e17a36000 upstream.

Send the USB device's serial, product, and manufacturer strings to the
/dev/random driver to help seed its pools.

Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usbdevfs: Correct amount of data copied to user in processcompl_compat</title>
<updated>2012-08-09T15:27:35+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2012-07-04T07:18:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a0f7a5ac6e752612427077b2c04db1e0ae720a66'/>
<id>a0f7a5ac6e752612427077b2c04db1e0ae720a66</id>
<content type='text'>
commit 2102e06a5f2e414694921f23591f072a5ba7db9f upstream.

iso data buffers may have holes in them if some packets were short, so for
iso urbs we should always copy the entire buffer, just like the regular
processcompl does.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2102e06a5f2e414694921f23591f072a5ba7db9f upstream.

iso data buffers may have holes in them if some packets were short, so for
iso urbs we should always copy the entire buffer, just like the regular
processcompl does.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: fix gathering of interface associations</title>
<updated>2012-06-22T18:34:16+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2012-06-12T18:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e3424d89f44e56186f65596725e7f28f30ab4998'/>
<id>e3424d89f44e56186f65596725e7f28f30ab4998</id>
<content type='text'>
commit b3a3dd074f7053ef824ad077e5331b52220ceba1 upstream.

TEAC's UD-H01 (and probably other devices) have a gap in the interface
number allocation of their descriptors:

  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          220
    bNumInterfaces          3
    [...]
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      [...]
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         2
      bInterfaceCount         2
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      [...]

Once a configuration is selected, usb_set_configuration() walks the
known interfaces of a given configuration and calls find_iad() on
each of them to set the interface association pointer the interface
is included in.

The problem here is that the loop variable is taken for the interface
number in the comparison logic that gathers the association. Which is
fine as long as the descriptors are sane.

In the case above, however, the logic gets out of sync and the
interface association fields of all interfaces beyond the interface
number gap are wrong.

Fix this by passing the interface's bInterfaceNumber to find_iad()
instead.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: bEN &lt;ml_all@circa.be&gt;
Reported-by: Ivan Perrone &lt;ivanperrone@hotmail.com&gt;
Tested-by: ivan perrone &lt;ivanperrone@hotmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b3a3dd074f7053ef824ad077e5331b52220ceba1 upstream.

TEAC's UD-H01 (and probably other devices) have a gap in the interface
number allocation of their descriptors:

  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          220
    bNumInterfaces          3
    [...]
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      [...]
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         2
      bInterfaceCount         2
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      [...]

Once a configuration is selected, usb_set_configuration() walks the
known interfaces of a given configuration and calls find_iad() on
each of them to set the interface association pointer the interface
is included in.

The problem here is that the loop variable is taken for the interface
number in the comparison logic that gathers the association. Which is
fine as long as the descriptors are sane.

In the case above, however, the logic gets out of sync and the
interface association fields of all interfaces beyond the interface
number gap are wrong.

Fix this by passing the interface's bInterfaceNumber to find_iad()
instead.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: bEN &lt;ml_all@circa.be&gt;
Reported-by: Ivan Perrone &lt;ivanperrone@hotmail.com&gt;
Tested-by: ivan perrone &lt;ivanperrone@hotmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2</title>
<updated>2012-06-22T18:34:15+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-06-13T15:20:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2c1a56c8c620ff93050ee4ef545cc585d2f93034'/>
<id>2c1a56c8c620ff93050ee4ef545cc585d2f93034</id>
<content type='text'>
commit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b upstream.

This patch (as1558) fixes a problem affecting several ASUS computers:
The machine crashes or corrupts memory when going into suspend if the
ehci-hcd driver is bound to any controllers.  Users have been forced
to unbind or unload ehci-hcd before putting their systems to sleep.

After extensive testing, it was determined that the machines don't
like going into suspend when any EHCI controllers are in the PCI D3
power state.  Presumably this is a firmware bug, but there's nothing
we can do about it except to avoid putting the controllers in D3
during system sleep.

The patch adds a new flag to indicate whether the problem is present,
and avoids changing the controller's power state if the flag is set.
Runtime suspend is unaffected; this matters only for system suspend.
However as a side effect, the controller will not respond to remote
wakeup requests while the system is asleep.  Hence USB wakeup is not
functional -- but of course, this is already true in the current state
of affairs.

A similar patch has already been applied as commit
151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during
suspend on ASUS computers).  The patch supersedes that one and reverts
it.  There are two differences:

	The old patch added the flag at the USB level; this patch
	adds it at the PCI level.

	The old patch applied to all chipsets with the same vendor,
	subsystem vendor, and product IDs; this patch makes an
	exception for a known-good system (based on DMI information).

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Dâniel Fraga &lt;fragabr@gmail.com&gt;
Tested-by: Andrey Rahmatullin &lt;wrar@wrar.name&gt;
Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b upstream.

This patch (as1558) fixes a problem affecting several ASUS computers:
The machine crashes or corrupts memory when going into suspend if the
ehci-hcd driver is bound to any controllers.  Users have been forced
to unbind or unload ehci-hcd before putting their systems to sleep.

After extensive testing, it was determined that the machines don't
like going into suspend when any EHCI controllers are in the PCI D3
power state.  Presumably this is a firmware bug, but there's nothing
we can do about it except to avoid putting the controllers in D3
during system sleep.

The patch adds a new flag to indicate whether the problem is present,
and avoids changing the controller's power state if the flag is set.
Runtime suspend is unaffected; this matters only for system suspend.
However as a side effect, the controller will not respond to remote
wakeup requests while the system is asleep.  Hence USB wakeup is not
functional -- but of course, this is already true in the current state
of affairs.

A similar patch has already been applied as commit
151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during
suspend on ASUS computers).  The patch supersedes that one and reverts
it.  There are two differences:

	The old patch added the flag at the USB level; this patch
	adds it at the PCI level.

	The old patch applied to all chipsets with the same vendor,
	subsystem vendor, and product IDs; this patch makes an
	exception for a known-good system (based on DMI information).

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Dâniel Fraga &lt;fragabr@gmail.com&gt;
Tested-by: Andrey Rahmatullin &lt;wrar@wrar.name&gt;
Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
