<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-06-14T13:07:43+00:00</updated>
<entry>
<title>usb: chipidea: debug: check before accessing ci_role</title>
<updated>2017-06-14T13:07:43+00:00</updated>
<author>
<name>Michael Thalmeier</name>
<email>michael.thalmeier@hale.at</email>
</author>
<published>2017-05-18T14:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd8980bb03d4c12533b556a2ae3f961504876d61'/>
<id>urn:sha1:dd8980bb03d4c12533b556a2ae3f961504876d61</id>
<content type='text'>
commit 0340ff83cd4475261e7474033a381bc125b45244 upstream.

ci_role BUGs when the role is &gt;= CI_ROLE_END.

Signed-off-by: Michael Thalmeier &lt;michael.thalmeier@hale.at&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix NULL pointer dereference if udc_start failed</title>
<updated>2017-06-14T13:07:42+00:00</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2017-04-24T12:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2967b72b6653ac81949d9b0a970a273a3137f69'/>
<id>urn:sha1:f2967b72b6653ac81949d9b0a970a273a3137f69</id>
<content type='text'>
commit aa1f058d7d9244423b8c5a75b9484b1115df7f02 upstream.

Fix below NULL pointer dereference. we set ci-&gt;roles[CI_ROLE_GADGET]
too early in ci_hdrc_gadget_init(), if udc_start() fails due to some
reason, the ci-&gt;roles[CI_ROLE_GADGET] check in  ci_hdrc_gadget_destroy
can't protect us.

We fix this issue by only setting ci-&gt;roles[CI_ROLE_GADGET] if
udc_start() succeed.

[    1.398550] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
...
[    1.448600] PC is at dma_pool_free+0xb8/0xf0
[    1.453012] LR is at dma_pool_free+0x28/0xf0
[    2.113369] [&lt;ffffff80081817d8&gt;] dma_pool_free+0xb8/0xf0
[    2.118857] [&lt;ffffff800841209c&gt;] destroy_eps+0x4c/0x68
[    2.124165] [&lt;ffffff8008413770&gt;] ci_hdrc_gadget_destroy+0x28/0x50
[    2.130461] [&lt;ffffff800840fa30&gt;] ci_hdrc_probe+0x588/0x7e8
[    2.136129] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.142066] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.148270] [&lt;ffffff800837f68c&gt;] __device_attach_driver+0x9c/0xf8
[    2.154563] [&lt;ffffff800837d570&gt;] bus_for_each_drv+0x58/0x98
[    2.160317] [&lt;ffffff800837f174&gt;] __device_attach+0xc4/0x138
[    2.166072] [&lt;ffffff800837f738&gt;] device_initial_probe+0x10/0x18
[    2.172185] [&lt;ffffff800837e58c&gt;] bus_probe_device+0x94/0xa0
[    2.177940] [&lt;ffffff800837c560&gt;] device_add+0x3f0/0x560
[    2.183337] [&lt;ffffff8008380d20&gt;] platform_device_add+0x180/0x240
[    2.189541] [&lt;ffffff800840f0e8&gt;] ci_hdrc_add_device+0x440/0x4f8
[    2.195654] [&lt;ffffff8008414194&gt;] ci_hdrc_usb2_probe+0x13c/0x2d8
[    2.201769] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.207705] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.213910] [&lt;ffffff800837f5ec&gt;] __driver_attach+0xac/0xb0
[    2.219575] [&lt;ffffff800837d4b0&gt;] bus_for_each_dev+0x60/0xa0
[    2.225329] [&lt;ffffff800837ec80&gt;] driver_attach+0x20/0x28
[    2.230816] [&lt;ffffff800837e880&gt;] bus_add_driver+0x1d0/0x238
[    2.236571] [&lt;ffffff800837fdb0&gt;] driver_register+0x60/0xf8
[    2.242237] [&lt;ffffff8008380ef4&gt;] __platform_driver_register+0x44/0x50
[    2.248891] [&lt;ffffff80086fd440&gt;] ci_hdrc_usb2_driver_init+0x18/0x20
[    2.255365] [&lt;ffffff8008082950&gt;] do_one_initcall+0x38/0x128
[    2.261121] [&lt;ffffff80086e0d00&gt;] kernel_init_freeable+0x1ac/0x250
[    2.267414] [&lt;ffffff800852f0b8&gt;] kernel_init+0x10/0x100
[    2.272810] [&lt;ffffff8008082680&gt;] ret_from_fork+0x10/0x50

Fixes: 3f124d233e97 ("usb: chipidea: add role init and destroy APIs")
Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: imx: Do not access CLKONOFF on i.MX51</title>
<updated>2017-06-14T13:07:42+00:00</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2017-05-15T13:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f26ac1fc9fbb718746f2d3b494d964574d902bf1'/>
<id>urn:sha1:f26ac1fc9fbb718746f2d3b494d964574d902bf1</id>
<content type='text'>
commit 62b97d502bb76c6e8d589e42e02bfcb7bdff0453 upstream.

Unlike i.MX53, i.MX51's USBOH3 register file does not implemenent
registers past offset 0x018, which includes
MX53_USB_CLKONOFF_CTRL_OFFSET and trying to access that register on
said platform results in external abort.

Fix it by enabling CLKONOFF accessing codepath only for i.MX53.

Fixes 3be3251db088 ("usb: chipidea: imx: Disable internal 60Mhz clock with ULPI PHY")
Cc: cphealy@gmail.com
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: dsps: keep VBUS on for host-only mode</title>
<updated>2017-06-14T13:07:42+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-05-25T18:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b89de0406a1a17d478b34976d6b1d4b2a1cca559'/>
<id>urn:sha1:b89de0406a1a17d478b34976d6b1d4b2a1cca559</id>
<content type='text'>
commit b3addcf0d1f04f53fcc302577d5a5e964c18531a upstream.

Currently VBUS is turned off while a usb device is detached, and turned
on again by the polling routine. This short period VBUS loss prevents
usb modem to switch mode.

VBUS should be constantly on for host-only mode, so this changes the
driver to not turn off VBUS for host-only mode.

Fixes: 2f3fd2c5bde1 ("usb: musb: Prepare dsps glue layer for PM runtime support")
Reported-by: Moreno Bartalucci &lt;moreno.bartalucci@tecnorama.it&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: f_mass_storage: Serialize wake and sleep execution</title>
<updated>2017-06-14T13:07:42+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2017-05-12T00:26:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c33b087c83e7fa77e7c5d6e4be3ca4b7ed8981d1'/>
<id>urn:sha1:c33b087c83e7fa77e7c5d6e4be3ca4b7ed8981d1</id>
<content type='text'>
commit dc9217b69dd6089dcfeb86ed4b3c671504326087 upstream.

f_mass_storage has a memorry barrier issue with the sleep and wake
functions that can cause a deadlock. This results in intermittent hangs
during MSC file transfer. The host will reset the device after receiving
no response to resume the transfer. This issue is seen when dwc3 is
processing 2 transfer-in-progress events at the same time, invoking
completion handlers for CSW and CBW. Also this issue occurs depending on
the system timing and latency.

To increase the chance to hit this issue, you can force dwc3 driver to
wait and process those 2 events at once by adding a small delay (~100us)
in dwc3_check_event_buf() whenever the request is for CSW and read the
event count again. Avoid debugging with printk and ftrace as extra
delays and memory barrier will mask this issue.

Scenario which can lead to failure:
-----------------------------------
1) The main thread sleeps and waits for the next command in
   get_next_command().
2) bulk_in_complete() wakes up main thread for CSW.
3) bulk_out_complete() tries to wake up the running main thread for CBW.
4) thread_wakeup_needed is not loaded with correct value in
   sleep_thread().
5) Main thread goes to sleep again.

The pattern is shown below. Note the 2 critical variables.
 * common-&gt;thread_wakeup_needed
 * bh-&gt;state

	CPU 0 (sleep_thread)		CPU 1 (wakeup_thread)
	==============================  ===============================

					bh-&gt;state = BH_STATE_FULL;
					smp_wmb();
	thread_wakeup_needed = 0;	thread_wakeup_needed = 1;
	smp_rmb();
	if (bh-&gt;state != BH_STATE_FULL)
		sleep again ...

As pointed out by Alan Stern, this is an R-pattern issue. The issue can
be seen when there are two wakeups in quick succession. The
thread_wakeup_needed can be overwritten in sleep_thread, and the read of
the bh-&gt;state maybe reordered before the write to thread_wakeup_needed.

This patch applies full memory barrier smp_mb() in both sleep_thread()
and wakeup_thread() to ensure the order which the thread_wakeup_needed
and bh-&gt;state are written and loaded.

However, a better solution in the future would be to use wait_queue
method that takes care of managing memory barrier between waker and
waiter.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: hub: fix non-SS hub-descriptor handling</title>
<updated>2017-05-25T13:46:20+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-10T16:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e2a08069dea9ac4365c32bec88b2df2f10cd3b7'/>
<id>urn:sha1:1e2a08069dea9ac4365c32bec88b2df2f10cd3b7</id>
<content type='text'>
commit bec444cd1c94c48df409a35ad4e5b143c245c3f7 upstream.

Add missing sanity check on the non-SuperSpeed hub-descriptor length in
order to avoid parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes (or a compound-device debug
statement).

Note that we only make sure that the DeviceRemovable field is always
present (and specifically ignore the unused PortPwrCtrlMask field) in
order to continue support any hubs with non-compliant descriptors. As a
further safeguard, the descriptor buffer is also cleared.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: hub: fix SS hub-descriptor handling</title>
<updated>2017-05-25T13:46:20+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-10T16:18:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=345477ed11af2884b086ecefbcc4ce2716b7acab'/>
<id>urn:sha1:345477ed11af2884b086ecefbcc4ce2716b7acab</id>
<content type='text'>
commit 2c25a2c818023df64463aac3288a9f969491e507 upstream.

A SuperSpeed hub descriptor does not have any variable-length fields so
bail out when reading a short descriptor.

This avoids parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes.

Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes")
Cc: John Youn &lt;John.Youn@synopsys.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: serial: io_ti: fix div-by-zero in set_termios</title>
<updated>2017-05-25T13:46:20+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-11T09:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a82455292c2b817031db57f6954f8b7e7b1dd38'/>
<id>urn:sha1:3a82455292c2b817031db57f6954f8b7e7b1dd38</id>
<content type='text'>
commit 6aeb75e6adfaed16e58780309613a578fe1ee90b upstream.

Fix a division-by-zero in set_termios when debugging is enabled and a
high-enough speed has been requested so that the divisor value becomes
zero.

Instead of just fixing the offending debug statement, cap the baud rate
at the base as a zero divisor value also appears to crash the firmware.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: serial: mct_u232: fix big-endian baud-rate handling</title>
<updated>2017-05-25T13:46:20+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-11T09:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4d3ae36fcb248aa1538bc654bd871f39f27b725'/>
<id>urn:sha1:e4d3ae36fcb248aa1538bc654bd871f39f27b725</id>
<content type='text'>
commit 26cede343656c0bc2c33cdc783771282405c7fb2 upstream.

Drop erroneous cpu_to_le32 when setting the baud rate, something which
corrupted the divisor on big-endian hosts.

Found using sparse:

	warning: incorrect type in argument 1 (different base types)
	    expected unsigned int [unsigned] [usertype] val
	    got restricted __le32 [usertype] &lt;noident&gt;

Fixes: af2ac1a091bc ("USB: serial mct_usb232: move DMA buffers to heap")
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-By: Pete Zaitcev &lt;zaitcev@yahoo.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: serial: qcserial: add more Lenovo EM74xx device IDs</title>
<updated>2017-05-25T13:46:20+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2017-05-17T14:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=07cf1f9d0150e66c2219dd96952ae6a3a8b69bfe'/>
<id>urn:sha1:07cf1f9d0150e66c2219dd96952ae6a3a8b69bfe</id>
<content type='text'>
commit 8d7a10dd323993cc40bd37bce8bc570133b0c396 upstream.

In their infinite wisdom, and never ending quest for end user frustration,
Lenovo has decided to use new USB device IDs for the wwan modules in
their 2017 laptops.  The actual hardware is still the Sierra Wireless
EM7455 or EM7430, depending on region.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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