From: Sasha Levin Date: Mon, 3 Feb 2020 13:42:05 +0000 (-0500) Subject: fixes for 4.4 X-Git-Tag: v5.5.2~18^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a8452801bc107636c3f7a9fdf48d35ca36aaff5;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.4 Signed-off-by: Sasha Levin --- diff --git a/queue-4.4/series b/queue-4.4/series index 6c580db01f2..20677822158 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -29,3 +29,4 @@ media-digitv-don-t-continue-if-remote-control-state-can-t-be-read.patch media-gspca-zero-usb_buf.patch media-dvb-usb-dvb-usb-urb.c-initialize-actlen-to-0.patch ttyprintk-fix-a-potential-deadlock-in-interrupt-context-issue.patch +usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch diff --git a/queue-4.4/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch b/queue-4.4/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch new file mode 100644 index 00000000000..c1c57c0169c --- /dev/null +++ b/queue-4.4/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch @@ -0,0 +1,40 @@ +From 2f31406f76c2f6f5c15ed3c982b18d6fbd45dba3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 11 Dec 2019 10:10:03 -0600 +Subject: usb: dwc3: turn off VBUS when leaving host mode + +From: Bin Liu + +[ Upstream commit 09ed259fac621634d51cd986aa8d65f035662658 ] + +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 +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/dwc3/core.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c +index 4378e758baef9..591bc3f7be763 100644 +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -801,6 +801,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) + /* do nothing */ + break; + } ++ ++ /* de-assert DRVVBUS for HOST and OTG mode */ ++ dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE); + } + + #define DWC3_ALIGN_MASK (16 - 1) +-- +2.20.1 +