aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.com>2021-06-08 13:00:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-10 13:37:11 +0200
commitfe4e0bd4c26c8d81bd352ef8a5fa1afc4cba06b4 (patch)
tree690506b9a524482e09e3e4f11ee632673099827c
parentext4: fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed (diff)
downloadwireguard-linux-fe4e0bd4c26c8d81bd352ef8a5fa1afc4cba06b4.tar.xz
wireguard-linux-fe4e0bd4c26c8d81bd352ef8a5fa1afc4cba06b4.zip
usb: dwc2: Fix build in periphal-only mode
In branches to which 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") has been back-ported, the bus_suspended member of struct dwc2_hsotg is only present in builds that support host-mode. To avoid having to pull in several more non-Fix commits in order to get it to compile, wrap the usage of the member in a macro conditional. Fixes: 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/dwc2/core_intr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index 9da27ec22d58..44d74584c727 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -712,7 +712,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;