Skip to content

Commit 34146c6

Browse files
Dinh Nguyengregkh
authored andcommitted
usb: dwc2: do not gate off the hardware if it does not support clock gating
We should not be clearing the HCD_FLAG_HW_ACCESSIBLE bit if the hardware does not support clock gating. Fixes: 50fb0c1 ("usb: dwc2: Add clock gating entering flow by system suspend") Acked-by: Minas Harutyunyan <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b52fe2d commit 34146c6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/usb/dwc2/hcd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4399,11 +4399,12 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
43994399
* If not hibernation nor partial power down are supported,
44004400
* clock gating is used to save power.
44014401
*/
4402-
if (!hsotg->params.no_clock_gating)
4402+
if (!hsotg->params.no_clock_gating) {
44034403
dwc2_host_enter_clock_gating(hsotg);
44044404

4405-
/* After entering suspend, hardware is not accessible */
4406-
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
4405+
/* After entering suspend, hardware is not accessible */
4406+
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
4407+
}
44074408
break;
44084409
default:
44094410
goto skip_power_saving;

0 commit comments

Comments
 (0)