[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180422135137.003707753@linuxfoundation.org>
Date: Sun, 22 Apr 2018 15:51:46 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Roger Quadros <rogerq@...com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>
Subject: [PATCH 4.14 039/164] usb: dwc3: prevent setting PRTCAP to OTG from debugfs
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roger Quadros <rogerq@...com>
commit daaecc6541d014dca073473ec8a4120c0babbeb4 upstream.
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@...r.kernel.org> # v4.12+
Signed-off-by: Roger Quadros <rogerq@...com>
Signed-off-by: Felipe Balbi <felipe.balbi@...ux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/usb/dwc3/core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -128,6 +128,9 @@ static void __dwc3_set_mode(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);
Powered by blists - more mailing lists