* [PATCH] usb: dwc2: Fix build in periphal-only mode
@ 2021-06-08 12:00 Phil Elwell
2021-06-08 13:07 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Phil Elwell @ 2021-06-08 12:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable; +Cc: Phil Elwell
In branches to which [1] 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>
[1] 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.")
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc2: Fix build in periphal-only mode
2021-06-08 12:00 [PATCH] usb: dwc2: Fix build in periphal-only mode Phil Elwell
@ 2021-06-08 13:07 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-08 13:07 UTC (permalink / raw)
To: Phil Elwell; +Cc: stable
On Tue, Jun 08, 2021 at 01:00:49PM +0100, Phil Elwell wrote:
> In branches to which [1] 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>
> [1] 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.")
> ---
> drivers/usb/dwc2/core_intr.c | 4 ++++
> 1 file changed, 4 insertions(+)
Now queued up everywhere, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc2: Fix build in periphal-only mode
2021-05-28 8:18 Phil Elwell
@ 2021-05-28 8:54 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-28 8:54 UTC (permalink / raw)
To: Phil Elwell
Cc: Minas Harutyunyan, Sasha Levin, Artur Petrosyan, linux-usb, linux-kernel
On Fri, May 28, 2021 at 09:18:18AM +0100, Phil Elwell wrote:
> 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.")
That commit id is not in Linus's tree :(
Please fix it with the real commit id and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] usb: dwc2: Fix build in periphal-only mode
@ 2021-05-28 8:18 Phil Elwell
2021-05-28 8:54 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Phil Elwell @ 2021-05-28 8:18 UTC (permalink / raw)
To: Minas Harutyunyan, Greg Kroah-Hartman, Sasha Levin,
Artur Petrosyan, linux-usb, linux-kernel
Cc: Phil Elwell
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@raspberrypi.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-08 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 12:00 [PATCH] usb: dwc2: Fix build in periphal-only mode Phil Elwell
2021-06-08 13:07 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2021-05-28 8:18 Phil Elwell
2021-05-28 8:54 ` Greg Kroah-Hartman
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.