This is a note to let you know that I've just added the patch titled
USB: cdc-acm: fix runtime PM for control messages
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-cdc-acm-fix-runtime-pm-for-control-messages.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From bae3f4c53585e9a170da9436e0f06919874bda9a Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 26 May 2014 19:23:39 +0200
Subject: USB: cdc-acm: fix runtime PM for control messages
From: Johan Hovold <[email protected]>
commit bae3f4c53585e9a170da9436e0f06919874bda9a upstream.
Fix runtime PM handling of control messages by adding the required PM
counter operations.
Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support remote wakeup")
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/class/cdc-acm.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -123,13 +123,23 @@ static void acm_release_minor(struct acm
static int acm_ctrl_msg(struct acm *acm, int request, int value,
void *buf, int len)
{
- int retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
+ int retval;
+
+ retval = usb_autopm_get_interface(acm->control);
+ if (retval)
+ return retval;
+
+ retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
request, USB_RT_ACM, value,
acm->control->altsetting[0].desc.bInterfaceNumber,
buf, len, 5000);
+
dev_dbg(&acm->control->dev,
"%s - rq 0x%02x, val %#x, len %#x, result %d\n",
__func__, request, value, len, retval);
+
+ usb_autopm_put_interface(acm->control);
+
return retval < 0 ? retval : 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/usb-cdc-acm-fix-i-o-after-failed-open.patch
queue-3.4/usb-cdc-acm-fix-write-and-resume-race.patch
queue-3.4/usb-cdc-acm-fix-runtime-pm-for-control-messages.patch
queue-3.4/usb-cdc-acm-fix-broken-runtime-suspend.patch
queue-3.4/usb-cdc-acm-fix-runtime-pm-imbalance-at-shutdown.patch
queue-3.4/usb-cdc-acm-fix-shutdown-and-suspend-race.patch
queue-3.4/usb-cdc-acm-fix-write-and-suspend-race.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html