[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210528081818.2601382-1-phil@raspberrypi.com>
Date: Fri, 28 May 2021 09:18:18 +0100
From: Phil Elwell <phil@...pberrypi.com>
To: Minas Harutyunyan <hminas@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sasha Levin <sashal@...nel.org>,
Artur Petrosyan <Arthur.Petrosyan@...opsys.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Phil Elwell <phil@...pberrypi.com>
Subject: [PATCH] usb: dwc2: Fix build in periphal-only mode
The bus_suspended member of struct dwc2_hsotg is only present in builds
that support host-mode.
Fixes: 62bb46f51f91 ("usb: dwc2: Fix hibernation between host and device modes.")
Signed-off-by: Phil Elwell <phil@...pberrypi.com>
---
drivers/usb/dwc2/core_intr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index a5ab03808da6..03d0c034cf57 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -725,7 +725,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg,
dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN);
hsotg->hibernated = 0;
+
+#if IS_ENABLED(CONFIG_USB_DWC2_HOST) || \
+ IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
hsotg->bus_suspended = 0;
+#endif
if (gpwrdn & GPWRDN_IDSTS) {
hsotg->op_state = OTG_STATE_B_PERIPHERAL;
--
2.25.1
Powered by blists - more mailing lists