]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.13-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Oct 2017 08:54:11 +0000 (10:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Oct 2017 08:54:11 +0000 (10:54 +0200)
added patches:
usb-gadget-core-fix-udc_set_speed-logic.patch

queue-4.13/series
queue-4.13/usb-gadget-core-fix-udc_set_speed-logic.patch [new file with mode: 0644]

index e6fc21bc0a954becddd3c6894779257416d371ab..4c9707a945912bc791eea7179f4eb808bf9c9c74 100644 (file)
@@ -42,9 +42,9 @@ netlink-do-not-proceed-if-dump-s-start-errs.patch
 ip6_gre-ip6gre_tap-device-should-keep-dst.patch
 ip6_tunnel-update-mtu-properly-for-arphrd_ether-tunnel-device-in-tx-path.patch
 ipv4-early-demux-can-return-an-error-code.patch
-udp-perform-source-validation-for-mcast-early-demux.patch
 tipc-use-only-positive-error-codes-in-messages.patch
 l2tp-fix-l2tp_eth-module-loading.patch
 socket-bpf-fix-possible-use-after-free.patch
 net-rtnetlink-fix-info-leak-in-rtm_getstats-call.patch
 bpf-fix-bpf_tail_call-x64-jit.patch
+usb-gadget-core-fix-udc_set_speed-logic.patch
diff --git a/queue-4.13/usb-gadget-core-fix-udc_set_speed-logic.patch b/queue-4.13/usb-gadget-core-fix-udc_set_speed-logic.patch
new file mode 100644 (file)
index 0000000..83d2d24
--- /dev/null
@@ -0,0 +1,41 @@
+From 97e133d54c1ca8948b191e5721a145a76c4db33d Mon Sep 17 00:00:00 2001
+From: Roger Quadros <rogerq@ti.com>
+Date: Tue, 19 Sep 2017 11:46:16 +0300
+Subject: usb: gadget: core: fix ->udc_set_speed() logic
+
+From: Roger Quadros <rogerq@ti.com>
+
+commit 97e133d54c1ca8948b191e5721a145a76c4db33d upstream.
+
+Consider the following case: udc controller supports SuperSpeed.  If we
+first load a HighSpeed gadget followed by a SuperSpeed gadget, the
+SuperSpeed gadget will be limited to HighSpeed as UDC core driver
+doesn't call ->udc_set_speed() in the second case.
+
+Call ->udc_set_speed() unconditionally to fix this issue.
+
+This will also fix the case for dwc3 controller driver when SuperSpeed
+gadget is loaded first and works in HighSpeed only as udc_set_speed()
+was never being called.
+
+Fixes: 6099eca796ae ("usb: gadget: core: introduce ->udc_set_speed() method")
+Signed-off-by: Roger Quadros <rogerq@ti.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc/core.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/udc/core.c
++++ b/drivers/usb/gadget/udc/core.c
+@@ -1314,8 +1314,7 @@ static int udc_bind_to_driver(struct usb
+       udc->dev.driver = &driver->driver;
+       udc->gadget->dev.driver = &driver->driver;
+-      if (driver->max_speed < udc->gadget->max_speed)
+-              usb_gadget_udc_set_speed(udc, driver->max_speed);
++      usb_gadget_udc_set_speed(udc, driver->max_speed);
+       ret = driver->bind(udc->gadget, driver);
+       if (ret)