[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190911064154.28633-4-nicolas.ferre@microchip.com>
Date: Wed, 11 Sep 2019 08:41:54 +0200
From: Nicolas Ferre <nicolas.ferre@...rochip.com>
To: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<stern@...land.harvard.edu>, <gregkh@...uxfoundation.org>
CC: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Ludovic Desroches <ludovic.desroches@...rochip.com>,
<Boris.Krasnovskiy@...rdconnect.com>, <linux-usb@...r.kernel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>
Subject: [PATCH 3/3] USB: host: ohci-at91: resume: balance the clock start call
From: Boris Krasnovskiy <Boris.Krasnovskiy@...rdconnect.com>
There is a clock enable counter run away problem in resume ohci_at91. Code
enables clock that was never disabled in case of non wakeup interface. That
would make clock unstoppable in future.
Use proper alternative to start clocks only if they were stopped before.
Signed-off-by: Boris Krasnovskiy <Boris.Krasnovskiy@...rdconnect.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@...rochip.com>
---
drivers/usb/host/ohci-at91.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 85d67fe42d59..513e48397743 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -643,8 +643,8 @@ ohci_hcd_at91_drv_resume(struct device *dev)
if (ohci_at91->wakeup)
disable_irq_wake(hcd->irq);
-
- at91_start_clock(ohci_at91);
+ else
+ at91_start_clock(ohci_at91);
ohci_resume(hcd, false);
--
2.17.1
Powered by blists - more mailing lists