]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 19:39:48 +0000 (12:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 19:39:48 +0000 (12:39 -0700)
added patches:
usb-option-fix-runtime-pm-handling.patch

queue-3.15/series
queue-3.15/usb-option-fix-runtime-pm-handling.patch [new file with mode: 0644]

index d63a5ffae9ac0702f026d652a932a5ec583b0c54..edfa00c8af8700833cd09f785bc90e7ce309abd8 100644 (file)
@@ -17,3 +17,4 @@ usb-gadget-rename-config_usb_gadget_pxa25x.patch
 usb-dwc3-gadget-clear-stall-when-disabling-endpoint.patch
 arm-omap-replace-checks-for-config_usb_gadget_omap.patch
 usb-ehci-avoid-bios-handover-on-the-hasee-e200.patch
+usb-option-fix-runtime-pm-handling.patch
diff --git a/queue-3.15/usb-option-fix-runtime-pm-handling.patch b/queue-3.15/usb-option-fix-runtime-pm-handling.patch
new file mode 100644 (file)
index 0000000..931aadd
--- /dev/null
@@ -0,0 +1,51 @@
+From acf47d4f9c39b1cba467aa9442fc2efe0b1da741 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 26 May 2014 19:23:10 +0200
+Subject: USB: option: fix runtime PM handling
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit acf47d4f9c39b1cba467aa9442fc2efe0b1da741 upstream.
+
+Fix potential I/O while runtime suspended due to missing PM operations
+in send_setup.
+
+Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the
+option driver")
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |   11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1925,6 +1925,7 @@ static int option_send_setup(struct usb_
+       struct option_private *priv = intfdata->private;
+       struct usb_wwan_port_private *portdata;
+       int val = 0;
++      int res;
+       portdata = usb_get_serial_port_data(port);
+@@ -1933,9 +1934,17 @@ static int option_send_setup(struct usb_
+       if (portdata->rts_state)
+               val |= 0x02;
+-      return usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
++      res = usb_autopm_get_interface(serial->interface);
++      if (res)
++              return res;
++
++      res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+                               0x22, 0x21, val, priv->bInterfaceNumber, NULL,
+                               0, USB_CTRL_SET_TIMEOUT);
++
++      usb_autopm_put_interface(serial->interface);
++
++      return res;
+ }
+ MODULE_AUTHOR(DRIVER_AUTHOR);