From: Nicolas Ferre <nicolas.ferre@microchip.com> To: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <stern@rowland.harvard.edu>, <gregkh@linuxfoundation.org> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>, Ludovic Desroches <ludovic.desroches@microchip.com>, <Boris.Krasnovskiy@lairdconnect.com>, <linux-usb@vger.kernel.org>, Nicolas Ferre <nicolas.ferre@microchip.com> Subject: [PATCH 3/3] USB: host: ohci-at91: resume: balance the clock start call Date: Wed, 11 Sep 2019 08:41:54 +0200 [thread overview] Message-ID: <20190911064154.28633-4-nicolas.ferre@microchip.com> (raw) In-Reply-To: <20190911064154.28633-1-nicolas.ferre@microchip.com> From: Boris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.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@lairdconnect.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.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
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@microchip.com> To: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <stern@rowland.harvard.edu>, <gregkh@linuxfoundation.org> Cc: Boris.Krasnovskiy@lairdconnect.com, Alexandre Belloni <alexandre.belloni@bootlin.com>, linux-usb@vger.kernel.org, Ludovic Desroches <ludovic.desroches@microchip.com> Subject: [PATCH 3/3] USB: host: ohci-at91: resume: balance the clock start call Date: Wed, 11 Sep 2019 08:41:54 +0200 [thread overview] Message-ID: <20190911064154.28633-4-nicolas.ferre@microchip.com> (raw) In-Reply-To: <20190911064154.28633-1-nicolas.ferre@microchip.com> From: Boris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.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@lairdconnect.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-11 6:42 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-11 6:41 [PATCH 0/3] USB: host: ohci-at91: tailor power consumption Nicolas Ferre 2019-09-11 6:41 ` Nicolas Ferre 2019-09-11 6:41 ` [PATCH 1/3] USB: host: ohci-at91: completely shutdown the controller in at91_stop_hc() Nicolas Ferre 2019-09-11 6:41 ` Nicolas Ferre 2019-09-11 6:41 ` [PATCH 2/3] USB: host: ohci-at91: suspend: delay needed before to stop clocks Nicolas Ferre 2019-09-11 6:41 ` Nicolas Ferre 2019-09-11 6:41 ` Nicolas Ferre [this message] 2019-09-11 6:41 ` [PATCH 3/3] USB: host: ohci-at91: resume: balance the clock start call Nicolas Ferre 2019-09-11 15:09 ` [PATCH 0/3] USB: host: ohci-at91: tailor power consumption Alan Stern 2019-09-11 15:09 ` Alan Stern
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190911064154.28633-4-nicolas.ferre@microchip.com \ --to=nicolas.ferre@microchip.com \ --cc=Boris.Krasnovskiy@lairdconnect.com \ --cc=alexandre.belloni@bootlin.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=ludovic.desroches@microchip.com \ --cc=stern@rowland.harvard.edu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.