diff options
author | John Crispin <john@phrozen.org> | 2017-03-22 09:43:01 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-03-22 09:45:18 +0100 |
commit | 3a3564ead5e4cf2f6ff73302c1e680b5575079ec (patch) | |
tree | e7acdf854e6577dd56616d8e5e0def8a2e0427d3 /target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch | |
parent | ef6c4cc4ee046aa3f0bdb307c2ceea45ac2636aa (diff) | |
download | upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.tar.gz upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.tar.bz2 upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.zip |
ipq806x: remove v4.4 support
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch b/target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch deleted file mode 100644 index 0f17918d36..0000000000 --- a/target/linux/ipq806x/patches-4.4/096-03-usb-dwc3-Validate-the-maximum_speed-parameter.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 77966eb85e6d988a6daaf8ac14ac33026ceb3ab7 Mon Sep 17 00:00:00 2001 -From: John Youn <John.Youn@synopsys.com> -Date: Fri, 19 Feb 2016 17:31:01 -0800 -Subject: usb: dwc3: Validate the maximum_speed parameter - -Check that dwc->maximum_speed is set to a valid value. Also add an error -when we use it later if we encounter an invalid value. - -Signed-off-by: John Youn <johnyoun@synopsys.com> -Signed-off-by: Felipe Balbi <balbi@kernel.org> ---- - drivers/usb/dwc3/core.c | 18 ++++++++++++++++-- - drivers/usb/dwc3/gadget.c | 9 ++++++--- - 2 files changed, 22 insertions(+), 5 deletions(-) - ---- a/drivers/usb/dwc3/core.c -+++ b/drivers/usb/dwc3/core.c -@@ -1012,8 +1012,20 @@ static int dwc3_probe(struct platform_de - goto err1; - } - -- /* default to superspeed if no maximum_speed passed */ -- if (dwc->maximum_speed == USB_SPEED_UNKNOWN) { -+ /* Check the maximum_speed parameter */ -+ switch (dwc->maximum_speed) { -+ case USB_SPEED_LOW: -+ case USB_SPEED_FULL: -+ case USB_SPEED_HIGH: -+ case USB_SPEED_SUPER: -+ case USB_SPEED_SUPER_PLUS: -+ break; -+ default: -+ dev_err(dev, "invalid maximum_speed parameter %d\n", -+ dwc->maximum_speed); -+ /* fall through */ -+ case USB_SPEED_UNKNOWN: -+ /* default to superspeed */ - dwc->maximum_speed = USB_SPEED_SUPER; - - /* -@@ -1023,6 +1035,8 @@ static int dwc3_probe(struct platform_de - (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) == - DWC3_GHWPARAMS3_SSPHY_IFC_GEN2)) - dwc->maximum_speed = USB_SPEED_SUPER_PLUS; -+ -+ break; - } - - /* Adjust Frame Length */ ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -1634,10 +1634,13 @@ static int dwc3_gadget_start(struct usb_ - case USB_SPEED_HIGH: - reg |= DWC3_DSTS_HIGHSPEED; - break; -- case USB_SPEED_SUPER: /* FALLTHROUGH */ -- case USB_SPEED_UNKNOWN: /* FALTHROUGH */ - default: -- reg |= DWC3_DSTS_SUPERSPEED; -+ dev_err(dwc->dev, "invalid dwc->maximum_speed (%d)\n", -+ dwc->maximum_speed); -+ /* fall through */ -+ case USB_SPEED_SUPER: -+ reg |= DWC3_DCFG_SUPERSPEED; -+ break; - } - } - dwc3_writel(dwc->regs, DWC3_DCFG, reg); |