diff mbox

musb + full speed device

Message ID 20140627155201.GJ8069@saruman.home
State New
Headers show

Commit Message

Felipe Balbi June 27, 2014, 3:52 p.m. UTC
Hi,

(please avoid top-posting)

On Wed, Jun 25, 2014 at 10:59:57AM +0200, Pedro Erencia wrote:
> Hi,
> 
> Thanks for the suggestions Felipe.
> 
> We are not processing our packets in during giveback, but anyway I've
> tried your patch and it results in a very little (~5%) increase in
> transfer rate.
> 
> I think it is a latency issue, since running the application reports a
> 97% idle time on top.
> 
> The profiling of the kernel functions gives the following
> 
> 
>  30238 total                                      0.0046
>  22903 omap3_enter_idle                          77.3750

hmm... can you disable autoidle on musb and see if it helps. The
simplest way is to an unbalanced pm_runtime_get_sync() in the driver, so
that usage counter never reaches zero. You can also just try setting a
larger timeout:
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index eff3c5c..7e28017 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1893,7 +1893,7 @@  musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 	}
 
 	pm_runtime_use_autosuspend(musb->controller);
-	pm_runtime_set_autosuspend_delay(musb->controller, 200);
+	pm_runtime_set_autosuspend_delay(musb->controller, 5000);
 	pm_runtime_enable(musb->controller);
 
 	spin_lock_init(&musb->lock);