]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: fix clock issue during resume in OTG mode
authorGary Bisson <gary.bisson@boundarydevices.com>
Mon, 25 Jan 2021 16:19:34 +0000 (17:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Feb 2021 09:21:40 +0000 (10:21 +0100)
commit4bad898c93c83286dc7416b4b223adbfe1f25116
tree53c3dea7e543852c7503625d83bb703a3622efa7
parent364b37c8af2e79f4d8a61e09642f4dfcd9439731
usb: dwc3: fix clock issue during resume in OTG mode

Commit fbe1ef48cffb ("usb: dwc3: support clocks and resets for DWC3
core") introduced clock support and a new function named
dwc3_core_init_for_resume() which enables the clock before calling
dwc3_core_init() during resume as clocks get disabled during suspend.

Unfortunately in this commit the DWC3_GCTL_PRTCAP_OTG case was forgotten
and therefore during resume, a platform could call dwc3_core_init()
without re-enabling the clocks first, preventing to resume properly.

So update the resume path to call dwc3_core_init_for_resume() as it
should.

Fixes: fbe1ef48cffb ("usb: dwc3: support clocks and resets for DWC3 core")
Cc: stable@vger.kernel.org
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Link: https://lore.kernel.org/r/20210125161934.527820-1-gary.bisson@boundarydevices.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c