* Patch "usb: chipidea: otg: gadget module load and unload support" has been added to the 4.1-stable tree
@ 2015-12-07 8:28 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-12-07 8:28 UTC (permalink / raw)
To: B47624, gregkh, jiada_wang, jun.li, peter.chen; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: chipidea: otg: gadget module load and unload support
to the 4.1-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-chipidea-otg-gadget-module-load-and-unload-support.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 85da852df66e5e0d3aba761b0fece7c958ff0685 Mon Sep 17 00:00:00 2001
From: Li Jun <B47624@freescale.com>
Date: Fri, 12 Dec 2014 09:11:42 +0800
Subject: usb: chipidea: otg: gadget module load and unload support
From: Li Jun <B47624@freescale.com>
commit 85da852df66e5e0d3aba761b0fece7c958ff0685 upstream.
This patch is to support load and unload gadget driver in full OTG mode.
Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Tested-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/udc.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1730,6 +1730,22 @@ static int ci_udc_start(struct usb_gadge
return retval;
}
+static void ci_udc_stop_for_otg_fsm(struct ci_hdrc *ci)
+{
+ if (!ci_otg_is_fsm_mode(ci))
+ return;
+
+ mutex_lock(&ci->fsm.lock);
+ if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) {
+ ci->fsm.a_bidl_adis_tmout = 1;
+ ci_hdrc_otg_fsm_start(ci);
+ } else if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) {
+ ci->fsm.protocol = PROTO_UNDEF;
+ ci->fsm.otg->state = OTG_STATE_UNDEFINED;
+ }
+ mutex_unlock(&ci->fsm.lock);
+}
+
/**
* ci_udc_stop: unregister a gadget driver
*/
@@ -1754,6 +1770,7 @@ static int ci_udc_stop(struct usb_gadget
ci->driver = NULL;
spin_unlock_irqrestore(&ci->lock, flags);
+ ci_udc_stop_for_otg_fsm(ci);
return 0;
}
Patches currently in stable-queue which might be from B47624@freescale.com are
queue-4.1/usb-chipidea-otg-gadget-module-load-and-unload-support.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-07 12:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07 8:28 Patch "usb: chipidea: otg: gadget module load and unload support" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).