stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] usb: dwc3: turn off VBUS when leaving host mode" failed to apply to 4.9-stable tree
@ 2020-01-30 10:06 gregkh
  2020-02-03  0:49 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2020-01-30 10:06 UTC (permalink / raw)
  To: b-liu, balbi, gregkh; +Cc: stable


The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 09ed259fac621634d51cd986aa8d65f035662658 Mon Sep 17 00:00:00 2001
From: Bin Liu <b-liu@ti.com>
Date: Wed, 11 Dec 2019 10:10:03 -0600
Subject: [PATCH] usb: dwc3: turn off VBUS when leaving host mode

VBUS should be turned off when leaving the host mode.
Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to
turn off VBUS power.

Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index f561c6c9e8a9..1d85c42b9c67 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 		/* do nothing */
 		break;
 	}
+
+	/* de-assert DRVVBUS for HOST and OTG mode */
+	dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
 }
 
 static void dwc3_get_properties(struct dwc3 *dwc)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: FAILED: patch "[PATCH] usb: dwc3: turn off VBUS when leaving host mode" failed to apply to 4.9-stable tree
  2020-01-30 10:06 FAILED: patch "[PATCH] usb: dwc3: turn off VBUS when leaving host mode" failed to apply to 4.9-stable tree gregkh
@ 2020-02-03  0:49 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2020-02-03  0:49 UTC (permalink / raw)
  To: gregkh; +Cc: b-liu, balbi, stable

On Thu, Jan 30, 2020 at 11:06:56AM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.9-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 09ed259fac621634d51cd986aa8d65f035662658 Mon Sep 17 00:00:00 2001
>From: Bin Liu <b-liu@ti.com>
>Date: Wed, 11 Dec 2019 10:10:03 -0600
>Subject: [PATCH] usb: dwc3: turn off VBUS when leaving host mode
>
>VBUS should be turned off when leaving the host mode.
>Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to
>turn off VBUS power.
>
>Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function")
>Cc: stable@vger.kernel.org
>Signed-off-by: Bin Liu <b-liu@ti.com>
>Signed-off-by: Felipe Balbi <balbi@kernel.org>
>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

That piece of code just moved around a bit, fixed up and queued for 4.9.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-03  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 10:06 FAILED: patch "[PATCH] usb: dwc3: turn off VBUS when leaving host mode" failed to apply to 4.9-stable tree gregkh
2020-02-03  0:49 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).