* patch "usb: dwc3: prevent setting PRTCAP to OTG from debugfs" added to usb-testing
@ 2018-03-23 12:40 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-23 12:40 UTC (permalink / raw)
To: rogerq, felipe.balbi, stable
This is a note to let you know that I've just added the patch titled
usb: dwc3: prevent setting PRTCAP to OTG from debugfs
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From daaecc6541d014dca073473ec8a4120c0babbeb4 Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq@ti.com>
Date: Tue, 27 Feb 2018 12:54:37 +0200
Subject: usb: dwc3: prevent setting PRTCAP to OTG from debugfs
We don't support PRTCAP == OTG yet, so prevent user from
setting it via debugfs.
Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
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 f1d838a4acd6..b014c87a7319 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -119,6 +119,9 @@ static void __dwc3_set_mode(struct work_struct *work)
if (dwc->dr_mode != USB_DR_MODE_OTG)
return;
+ if (dwc->desired_dr_role == DWC3_GCTL_PRTCAP_OTG)
+ return;
+
switch (dwc->current_dr_role) {
case DWC3_GCTL_PRTCAP_HOST:
dwc3_host_exit(dwc);
--
2.16.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-23 12:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-23 12:40 patch "usb: dwc3: prevent setting PRTCAP to OTG from debugfs" added to usb-testing gregkh
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).