<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/musb, branch master</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=master</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2017-01-25T10:02:29+00:00</updated>
<entry>
<title>usb: musb: Fix external abort on non-linefetch for musb_irq_work()</title>
<updated>2017-01-25T10:02:29+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2017-01-24T15:18:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=3ba7b7795b7e8889af1377904c55c7fae9e0c775'/>
<id>urn:sha1:3ba7b7795b7e8889af1377904c55c7fae9e0c775</id>
<content type='text'>
While testing musb host mode cable plugging on a BeagleBone, I came across this
error:

Unhandled fault: external abort on non-linefetch (0x1008) at 0xd1dcfc60
...
[&lt;bf668390&gt;] (musb_default_readb [musb_hdrc]) from [&lt;bf668578&gt;] (musb_irq_work+0x1c/0x180 [musb_hdrc])
[&lt;bf668578&gt;] (musb_irq_work [musb_hdrc]) from [&lt;c0156554&gt;] (process_one_work+0x2b4/0x808)
[&lt;c0156554&gt;] (process_one_work) from [&lt;c015767c&gt;] (worker_thread+0x3c/0x550)
[&lt;c015767c&gt;] (worker_thread) from [&lt;c015d568&gt;] (kthread+0x104/0x148)
[&lt;c015d568&gt;] (kthread) from [&lt;c01078d0&gt;] (ret_from_fork+0x14/0x24)

Signed-off-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;
</content>
</entry>
<entry>
<title>usb: musb: Fix host mode error -71 regression</title>
<updated>2017-01-25T10:02:29+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2017-01-24T15:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=407788b51db6f6aab499d02420082f436abf3238'/>
<id>urn:sha1:407788b51db6f6aab499d02420082f436abf3238</id>
<content type='text'>
Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for
musb-core") started implementing musb generic runtime PM support by
introducing devctl register session bit based state control.

This caused a regression where if a USB mass storage device is connected
to a USB hub, we can get:

usb 1-1: reset high-speed USB device number 2 using musb-hdrc
usb 1-1: device descriptor read/64, error -71
usb 1-1.1: new high-speed USB device number 4 using musb-hdrc

This is because before the USB storage device is connected, musb is
in OTG_STATE_A_SUSPEND. And we currently only set need_finish_resume
in musb_stage0_irq() and the related code calling finish_resume_work
in musb_resume() and musb_runtime_resume() never gets called.

To fix the issue, we can call schedule_delayed_work() directly in
musb_stage0_irq() to have finish_resume_work run.

And we should no longer never get interrupts when when suspended.
We have changed musb to no longer need pm_runtime_irqsafe().
The need_finish_resume flag was added in commit 9298b4aad37e ("usb:
musb: fix device hotplug behind hub") and no longer applies as far
as I can tell. So let's just remove the earlier code that no longer
is needed.

Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core")
Reported-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: fix runtime PM in debugfs</title>
<updated>2017-01-10T17:26:19+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-01-10T16:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=7b6c1b4c0e1e44544aa18161dba6a741c080a7ef'/>
<id>urn:sha1:7b6c1b4c0e1e44544aa18161dba6a741c080a7ef</id>
<content type='text'>
MUSB driver now has runtime PM support, but the debugfs driver misses
the PM _get/_put() calls, which could cause MUSB register access
failure.

Cc: stable@vger.kernel.org # 4.9+
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;
</content>
</entry>
<entry>
<title>usb: musb: blackfin: add bfin_fifo_offset in bfin_ops</title>
<updated>2017-01-05T18:18:05+00:00</updated>
<author>
<name>Jérémy Lefaure</name>
<email>jeremy.lefaure@lse.epita.fr</email>
</author>
<published>2017-01-04T00:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=5563bb5743cb09bde0d0f4660a5e5b19c26903bf'/>
<id>urn:sha1:5563bb5743cb09bde0d0f4660a5e5b19c26903bf</id>
<content type='text'>
The function bfin_fifo_offset is defined but not used:

drivers/usb/musb/blackfin.c:36:12: warning: ‘bfin_fifo_offset’ defined
but not used [-Wunused-function]
 static u32 bfin_fifo_offset(u8 epnum)
             ^~~~~~~~~~~~~~~~

Adding bfin_fifo_offset to bfin_ops fixes this warning and allows musb
core to call this function instead of default_fifo_offset.

Fixes: cc92f6818f6e ("usb: musb: Populate new IO functions for blackfin")
Signed-off-by: Jérémy Lefaure &lt;jeremy.lefaure@lse.epita.fr&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: fix compilation warning on unused function</title>
<updated>2017-01-05T18:18:05+00:00</updated>
<author>
<name>Jérémy Lefaure</name>
<email>jeremy.lefaure@lse.epita.fr</email>
</author>
<published>2017-01-04T00:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=c8bd2ac3b4c6c84c4a7cdceaed626247db698ab2'/>
<id>urn:sha1:c8bd2ac3b4c6c84c4a7cdceaed626247db698ab2</id>
<content type='text'>
The function musb_run_resume_work is called only when CONFIG_PM is
enabled. So this function should not be defined when CONFIG_PM is
disabled. Otherwise the compiler issues a warning:

drivers/usb/musb/musb_core.c:2057:12: error: ‘musb_run_resume_work’ defined but
not used [-Werror=unused-function]
 static int musb_run_resume_work(struct musb *musb)
            ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jérémy Lefaure &lt;jeremy.lefaure@lse.epita.fr&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Fix trying to free already-free IRQ 4</title>
<updated>2017-01-05T18:18:05+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2017-01-04T00:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=8c300fe282fa254ea730c92cb0983e2642dc1fff'/>
<id>urn:sha1:8c300fe282fa254ea730c92cb0983e2642dc1fff</id>
<content type='text'>
When unloading omap2430, we can get the following splat:

WARNING: CPU: 1 PID: 295 at kernel/irq/manage.c:1478 __free_irq+0xa8/0x2c8
Trying to free already-free IRQ 4
...
[&lt;c01a8b78&gt;] (free_irq) from [&lt;bf0aea84&gt;]
(musbhs_dma_controller_destroy+0x28/0xb0 [musb_hdrc])
[&lt;bf0aea84&gt;] (musbhs_dma_controller_destroy [musb_hdrc]) from
[&lt;bf09f88c&gt;] (musb_remove+0xf0/0x12c [musb_hdrc])
[&lt;bf09f88c&gt;] (musb_remove [musb_hdrc]) from [&lt;c056a384&gt;]
(platform_drv_remove+0x24/0x3c)
...

This is because the irq number in use is 260 nowadays, and the dma
controller is using u8 instead of int.

Fixes: 6995eb68aab7 ("USB: musb: enable low level DMA operation for Blackfin")
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
[b-liu@ti.com: added Fixes tag]
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: dsps: implement clear_ep_rxintr() callback</title>
<updated>2017-01-05T18:18:05+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-01-04T00:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=c48400baa02155a5ddad63e8554602e48782278c'/>
<id>urn:sha1:c48400baa02155a5ddad63e8554602e48782278c</id>
<content type='text'>
During dma teardown for dequque urb, if musb load is high, musb might
generate bogus rx ep interrupt even when the rx fifo is flushed. In such
case any of the follow log messages could happen.

    musb_host_rx 1853: BOGUS RX2 ready, csr 0000, count 0

    musb_host_rx 1936: RX3 dma busy, csr 2020

As mentioned in the current inline comment, clearing ep interrupt in the
teardown path avoids the bogus interrupt, so implement clear_ep_rxintr()
callback.

This bug seems to be existing since the initial driver for musb support,
but I only validated the fix back to v4.1, so only cc stable for v4.1+.

cc: stable@vger.kernel.org # 4.1+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: core: add clear_ep_rxintr() to musb_platform_ops</title>
<updated>2017-01-05T18:18:05+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-01-04T00:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=6def85a396ce7796bd9f4561c6ae8138833f7a52'/>
<id>urn:sha1:6def85a396ce7796bd9f4561c6ae8138833f7a52</id>
<content type='text'>
During dma teardown for dequque urb, if musb load is high, musb might
generate bogus rx ep interrupt even when the rx fifo is flushed. In such
case any of the follow log messages could happen.

	musb_host_rx 1853: BOGUS RX2 ready, csr 0000, count 0

	musb_host_rx 1936: RX3 dma busy, csr 2020

As mentioned in the current inline comment, clearing ep interrupt in the
teardown path avoids the bogus interrupt.

Clearing ep interrupt is platform dependent, so this patch adds a
platform callback to allow glue driver to clear the ep interrupt.

This bug seems to be existing since the initial driver for musb support,
but I only validated the fix back to v4.1, so only cc stable for v4.1+.

cc: stable@vger.kernel.org # 4.1+
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ktime: Cleanup ktime_set() usage</title>
<updated>2016-12-25T16:21:22+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-12-25T11:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=8b0e195314fabd58a331c4f7b6db75a1565535d7'/>
<id>urn:sha1:8b0e195314fabd58a331c4f7b6db75a1565535d7</id>
<content type='text'>
ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>urn:sha1:7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
