This is a note to let you know that I've just added the patch titled

    usb: gadget: udc-core: stop UDC on device-initiated disconnect

to the 3.3-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-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6d258a4c42089229b855fd706622029decf316d6 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <[email protected]>
Date: Thu, 15 Mar 2012 16:37:18 +0200
Subject: usb: gadget: udc-core: stop UDC on device-initiated disconnect

From: Felipe Balbi <[email protected]>

commit 6d258a4c42089229b855fd706622029decf316d6 upstream.

When we want to do device-initiated disconnect,
let's make sure we stop the UDC in order to
e.g. allow lower power states to be achieved by
turning off unnecessary clocks and/or stoping
PHYs.

When reconnecting, call ->udc_start() again to
make sure UDC is reinitialized.

Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/gadget/udc-core.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -359,8 +359,12 @@ static ssize_t usb_udc_softconn_store(st
        struct usb_udc          *udc = container_of(dev, struct usb_udc, dev);
 
        if (sysfs_streq(buf, "connect")) {
+               if (udc_is_newstyle(udc))
+                       usb_gadget_udc_start(udc->gadget, udc->driver);
                usb_gadget_connect(udc->gadget);
        } else if (sysfs_streq(buf, "disconnect")) {
+               if (udc_is_newstyle(udc))
+                       usb_gadget_udc_stop(udc->gadget, udc->driver);
                usb_gadget_disconnect(udc->gadget);
        } else {
                dev_err(dev, "unsupported command '%s'\n", buf);


Patches currently in stable-queue which might be from [email protected] are

queue-3.3/usb-gadget-eliminate-null-pointer-dereference-bugfix.patch
queue-3.3/usb-gadget-udc-core-fix-asymmetric-calls-in-remove_driver.patch
queue-3.3/usb-musb-omap-fix-crash-when-musb-glue-omap-gets-initialized.patch
queue-3.3/usb-gadget-udc-core-stop-udc-on-device-initiated-disconnect.patch
queue-3.3/usb-musb-omap-fix-the-error-check-for-pm_runtime_get_sync.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

Reply via email to