Re: [PATCH] usb: musb: dsps: kill OTG timer on suspend

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

 



On 2014-09-15 09:39:09 [-0500], Felipe Balbi wrote:
> if we don't make sure to kill the timer, it could
> expire after we have already gated our clocks.
> 
> That will trigger a Data Abort exception because
> we would try to access register while clock is gated.

That timer deserves to be killed because nobody wants it to wakeup the
system from suspend. However the Data Abort wouldn't happen if the timer
would use pm_runtime_get_sync() right?
 
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -870,6 +870,7 @@ static int dsps_suspend(struct device *dev)
>  	struct musb *musb = platform_get_drvdata(glue->musb);
>  	void __iomem *mbase = musb->ctrl_base;
>  
> +	del_timer_sync(&glue->timer);
>  	glue->context.control = dsps_readl(mbase, wrp->control);
>  	glue->context.epintr = dsps_readl(mbase, wrp->epintr_set);
>  	glue->context.coreintr = dsps_readl(mbase, wrp->coreintr_set);
> @@ -895,6 +896,7 @@ static int dsps_resume(struct device *dev)
>  	dsps_writel(mbase, wrp->mode, glue->context.mode);
>  	dsps_writel(mbase, wrp->tx_mode, glue->context.tx_mode);
>  	dsps_writel(mbase, wrp->rx_mode, glue->context.rx_mode);
> +	setup_timer(&glue->timer, otg_timer, (unsigned long) musb);

You need a mod_timer() here instead. I will send a patch in a few.

>  	return 0;
>  }

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux