Re: [PATCH 2/2] usb: chipidea: udc: do not run udc directly when start udc in otg fsm mode

2015-02-09 Thread Peter Chen
On Mon, Feb 09, 2015 at 09:23:59PM +0800, Li Jun wrote:
 From: Li Jun b47...@freescale.com
 
 For A-device, when load gadget driver, we should not run udc either as this
 will be controlled by otg fsm.
 
 Signed-off-by: Li Jun jun...@freescale.com
 ---
  drivers/usb/chipidea/udc.c |5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
 index 4254792..c85a9ee 100644
 --- a/drivers/usb/chipidea/udc.c
 +++ b/drivers/usb/chipidea/udc.c
 @@ -1689,8 +1689,9 @@ static int ci_udc_start(struct usb_gadget *gadget,
   ci-driver = driver;
  
   /* Start otg fsm for B-device */
 - if (ci_otg_is_fsm_mode(ci)  ci-fsm.id) {
 - ci_hdrc_otg_fsm_start(ci);
 + if (ci_otg_is_fsm_mode(ci)) {
 + if (ci-fsm.id)
 + ci_hdrc_otg_fsm_start(ci);
   return retval;
   }
  

In fact, we can quit for all hosts, would you have a patch for that?

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] usb: chipidea: udc: do not run udc directly when start udc in otg fsm mode

2015-02-09 Thread Li Jun
From: Li Jun b47...@freescale.com

For A-device, when load gadget driver, we should not run udc either as this
will be controlled by otg fsm.

Signed-off-by: Li Jun jun...@freescale.com
---
 drivers/usb/chipidea/udc.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 4254792..c85a9ee 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1689,8 +1689,9 @@ static int ci_udc_start(struct usb_gadget *gadget,
ci-driver = driver;
 
/* Start otg fsm for B-device */
-   if (ci_otg_is_fsm_mode(ci)  ci-fsm.id) {
-   ci_hdrc_otg_fsm_start(ci);
+   if (ci_otg_is_fsm_mode(ci)) {
+   if (ci-fsm.id)
+   ci_hdrc_otg_fsm_start(ci);
return retval;
}
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html