From: Sebastian Andrzej Siewior Date: Mon, 13 Oct 2014 10:16:13 +0000 (+0200) Subject: usb: musb: dsps: start OTG timer on resume again X-Git-Tag: submit/tizen/20160422.055611~1^2~99^2~11^2~178 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b944ad83dbdaa0d02ed9e0a1d5749475f62561a4;p=sdk%2Femulator%2Femulator-kernel.git usb: musb: dsps: start OTG timer on resume again commit 53185b3a441a6cc9bb3f57e924342d249138dcd6 upstream. Commit 468bcc2a2ca ("usb: musb: dsps: kill OTG timer on suspend") stopped the timer in suspend path but forgot the re-enable it in the resume path. This patch fixes the behaviour. Fixes 468bcc2a2ca "usb: musb: dsps: kill OTG timer on suspend" Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 85f5215871de..865243e818b7 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -733,7 +733,9 @@ 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); + if (musb->xceiv->state == OTG_STATE_B_IDLE && + musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE) + mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ); return 0; }