On Thu, Mar 26, 2015 at 01:36:19PM +0800, Li Jun wrote:
> On Thu, Mar 26, 2015 at 11:50:11AM +0800, Chen Peter-B29397 wrote:
> >  
> > > 
> > > This is to fix the problem of HNP you reported after apply my HNP polling
> > > patchset, I verified with i.MX6DL and i.MX6SX SDB and it works ok(with 
> > > each
> > > one as A or B device).
> > > 
> > > ---
> > >  drivers/usb/chipidea/otg_fsm.c | 4 ----
> > >  1 file changed, 4 deletions(-)
> > > 
> > > diff --git a/drivers/usb/chipidea/otg_fsm.c 
> > > b/drivers/usb/chipidea/otg_fsm.c
> > > index 82b1e23..789dd76 100644
> > > --- a/drivers/usb/chipidea/otg_fsm.c
> > > +++ b/drivers/usb/chipidea/otg_fsm.c
> > > @@ -531,7 +531,6 @@ static int ci_otg_start_host(struct otg_fsm *fsm, int 
> > > on)
> > > {
> > >   struct ci_hdrc  *ci = container_of(fsm, struct ci_hdrc, fsm);
> > > 
> > > - mutex_unlock(&fsm->lock);
> > >   if (on) {
> > >           ci_role_stop(ci);
> > >           ci_role_start(ci, CI_ROLE_HOST);
> > > @@ -540,7 +539,6 @@ static int ci_otg_start_host(struct otg_fsm *fsm, int 
> > > on)
> > >           hw_device_reset(ci);
> > >           ci_role_start(ci, CI_ROLE_GADGET);
> > >   }
> > > - mutex_lock(&fsm->lock);
> > >   return 0;
> > >  }
> > > 
> > 
> > What is intention you added before?
> > 
> 
> not to sleep with the lock hold, actually it's not a problem.
> 
> Li Jun
> > Peter
> > 
> > > @@ -548,12 +546,10 @@ static int ci_otg_start_gadget(struct otg_fsm *fsm, 
> > > int
> > > on)  {
> > >   struct ci_hdrc  *ci = container_of(fsm, struct ci_hdrc, fsm);
> > > 
> > > - mutex_unlock(&fsm->lock);
> > >   if (on)
> > >           usb_gadget_vbus_connect(&ci->gadget);
> > >   else
> > >           usb_gadget_vbus_disconnect(&ci->gadget);
> > > - mutex_lock(&fsm->lock);
> > > 
> > >   return 0;
> > >  }
> > > --
> > > 1.9.1
> > 

Need to Cc: <sta...@vger.kernel.org> #vx.y+

-- 

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

Reply via email to