aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2017-01-24 10:18:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 05:02:29 -0500
commit3ba7b7795b7e8889af1377904c55c7fae9e0c775 (patch)
treebd9ed8b22bb26f0a21a746f2d779f13d9098a77f
parent407788b51db6f6aab499d02420082f436abf3238 (diff)
usb: musb: Fix external abort on non-linefetch for musb_irq_work()
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 ... [<bf668390>] (musb_default_readb [musb_hdrc]) from [<bf668578>] (musb_irq_work+0x1c/0x180 [musb_hdrc]) [<bf668578>] (musb_irq_work [musb_hdrc]) from [<c0156554>] (process_one_work+0x2b4/0x808) [<c0156554>] (process_one_work) from [<c015767c>] (worker_thread+0x3c/0x550) [<c015767c>] (worker_thread) from [<c015d568>] (kthread+0x104/0x148) [<c015d568>] (kthread) from [<c01078d0>] (ret_from_fork+0x14/0x24) Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/musb/musb_core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index cd40467be3c5..772f15821242 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1925,6 +1925,14 @@ static void musb_pm_runtime_check_session(struct musb *musb)
1925static void musb_irq_work(struct work_struct *data) 1925static void musb_irq_work(struct work_struct *data)
1926{ 1926{
1927 struct musb *musb = container_of(data, struct musb, irq_work.work); 1927 struct musb *musb = container_of(data, struct musb, irq_work.work);
1928 int error;
1929
1930 error = pm_runtime_get_sync(musb->controller);
1931 if (error < 0) {
1932 dev_err(musb->controller, "Could not enable: %i\n", error);
1933
1934 return;
1935 }
1928 1936
1929 musb_pm_runtime_check_session(musb); 1937 musb_pm_runtime_check_session(musb);
1930 1938
@@ -1932,6 +1940,9 @@ static void musb_irq_work(struct work_struct *data)
1932 musb->xceiv_old_state = musb->xceiv->otg->state; 1940 musb->xceiv_old_state = musb->xceiv->otg->state;
1933 sysfs_notify(&musb->controller->kobj, NULL, "mode"); 1941 sysfs_notify(&musb->controller->kobj, NULL, "mode");
1934 } 1942 }
1943
1944 pm_runtime_mark_last_busy(musb->controller);
1945 pm_runtime_put_autosuspend(musb->controller);
1935} 1946}
1936 1947
1937static void musb_recover_from_babble(struct musb *musb) 1948static void musb_recover_from_babble(struct musb *musb)