Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 08, 2016 at 03:05:30PM -0700, Tony Lindgren wrote:
> OK. The patch below still works for me with musb_core.c
> autosuspend_delay set to 100. Also works with it set to 10.
> 
> Note that we had two timeouts without this.. Can you try
> playing with the timeout in musb_core.c and see if that
> helps?


This patch works for me, also with autosuspend_delay set to 10.

Tested-by: Ladislav Michl <ladis@xxxxxxxxxxxxxx>

Thank you,
	ladis

> Regards,
> 
> Tony
> 
> 8< ------------------
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1898,8 +1898,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
>  		musb->quirk_retries = 3;
>  	} else {
>  		musb_dbg(musb, "Allow PM with no session: %02x", devctl);
> -		pm_runtime_mark_last_busy(musb->controller);
> -		pm_runtime_put_autosuspend(musb->controller);
> +		pm_runtime_put_sync_suspend(musb->controller);
>  	}
>  
>  	musb->session = s;
> @@ -2268,7 +2267,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
>  	 * 500 ms for some margin.
>  	 */
>  	pm_runtime_use_autosuspend(musb->controller);
> -	pm_runtime_set_autosuspend_delay(musb->controller, 500);
> +	pm_runtime_set_autosuspend_delay(musb->controller, 100);
>  	pm_runtime_enable(musb->controller);
>  	pm_runtime_get_sync(musb->controller);
>  
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -513,17 +513,18 @@ static int omap2430_probe(struct platform_device *pdev)
>  	}
>  
>  	pm_runtime_enable(glue->dev);
> -	pm_runtime_use_autosuspend(glue->dev);
> -	pm_runtime_set_autosuspend_delay(glue->dev, 100);
>  
>  	ret = platform_device_add(musb);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to register musb device\n");
> -		goto err2;
> +		goto err3;
>  	}
>  
>  	return 0;
>  
> +err3:
> +	pm_runtime_disable(glue->dev);
> +
>  err2:
>  	platform_device_put(musb);
>  
> @@ -535,10 +536,7 @@ static int omap2430_remove(struct platform_device *pdev)
>  {
>  	struct omap2430_glue *glue = platform_get_drvdata(pdev);
>  
> -	pm_runtime_get_sync(glue->dev);
>  	platform_device_unregister(glue->musb);
> -	pm_runtime_put_sync(glue->dev);
> -	pm_runtime_dont_use_autosuspend(glue->dev);
>  	pm_runtime_disable(glue->dev);
>  
>  	return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux