diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-29 05:14:28 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-29 05:15:36 -0300 |
commit | 3ba235acf590ccebbf31f178be1990ec1ccdd5e9 (patch) | |
tree | 1409ab98e9485fcfbb8051bcfa63d5ee015bb595 /kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch | |
parent | 7bd0d151ac63d6b0955185bd79befb5d493820de (diff) | |
download | abslibre-3ba235acf590ccebbf31f178be1990ec1ccdd5e9.tar.gz abslibre-3ba235acf590ccebbf31f178be1990ec1ccdd5e9.tar.bz2 abslibre-3ba235acf590ccebbf31f178be1990ec1ccdd5e9.zip |
linux-libre-rt-4.8.2_gnu.rt3-1: updating version
Diffstat (limited to 'kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch')
-rw-r--r-- | kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch b/kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch new file mode 100644 index 000000000..16ae76b8b --- /dev/null +++ b/kernels/linux-libre-rt/0012-usb-musb-Call-pm_runtime-from-musb_gadget_queue.patch @@ -0,0 +1,56 @@ +From 25245e060b4626a625e1849b027b3bebc9696ff4 Mon Sep 17 00:00:00 2001 +From: Tony Lindgren <tony@atomide.com> +Date: Fri, 30 Sep 2016 11:10:10 -0700 +Subject: [PATCH 12/14] usb: musb: Call pm_runtime from musb_gadget_queue + +If we're booting pandaboard using NFSroot over built-in g_ether, we +can get the following after booting once and doing a warm reset: + +g_ether gadget: ecm_open +g_ether gadget: notify connect true +... +WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147 +l3_interrupt_handler+0x220/0x34c +44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4CFG (Read): +Data Access in User mode du ring Functional access +... + +Fix the issue by calling pm_runtime functions from +musb_gadget_queue. + +Note that in the long run we should be able to queue the pending +transfers if pm_runtime is not active, and flush the queue from +pm_runtime_resume. + +Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + drivers/usb/musb/musb_gadget.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c +index 6d1e975..8ccc1b1 100644 +--- a/drivers/usb/musb/musb_gadget.c ++++ b/drivers/usb/musb/musb_gadget.c +@@ -1255,6 +1255,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, + + map_dma_buffer(request, musb, musb_ep); + ++ pm_runtime_get_sync(musb->controller); + spin_lock_irqsave(&musb->lock, lockflags); + + /* don't queue if the ep is down */ +@@ -1275,6 +1276,9 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req, + + unlock: + spin_unlock_irqrestore(&musb->lock, lockflags); ++ pm_runtime_mark_last_busy(musb->controller); ++ pm_runtime_put_autosuspend(musb->controller); ++ + return status; + } + +-- +2.10.0 + |