On Fri, Jul 27, 2012 at 01:01:07PM +0200, Ajay M JAWADE wrote: > After sending the USB Bus reset, Host waits for High Speed Chirps. > If the soft-disconnect and soft-connect happens during this chirp time, > then Host doesn't detect this disconnect. > Host treats this as Full Speed Device as there are no chirps. > To avoid this Full Speed Enumeration, soft-disconnect and soft-connect > should have a 500 milliseconds gap when USB cable is connected. > > Signed-off-by: Ajay Jawade <ajay.jawade@xxxxxxxxxxxxxx> > Acked-by: srinidhi kasagar <srinidhi.kasagar@xxxxxxxxxxxxxx> > --- > drivers/usb/musb/musb_gadget.c | 23 +++++++++++++++++++++++ > 1 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c > index f7194cf..1ff1bde 100644 > --- a/drivers/usb/musb/musb_gadget.c > +++ b/drivers/usb/musb/musb_gadget.c > @@ -1743,6 +1743,7 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) > { > struct musb *musb = gadget_to_musb(gadget); > unsigned long flags; > + u8 devctl; > > is_on = !!is_on; > > @@ -1751,6 +1752,28 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) > /* NOTE: this assumes we are sensing vbus; we'd rather > * not pullup unless the B-session is active. > */ > + > + /* After sending the USB Bus reset, Host waits for > + * High Speed Chirps. If the soft-disconnect and soft-connect > + * happens during this chirp time, then Host doesn't > + * detect this disconnecr. Host treats this as Full Speed > + * Device as there are no chirps. To avoid this Full Speed > + * Enumeration, soft-disconnect and soft-connect should have > + * a 500 milliseconds delay when USB cable is connected. > + */ > + if (is_on && (is_on != musb->softconnect)) { this can be turned into: if (is_on && !musb->softconnect) -- balbi
Attachment:
signature.asc
Description: Digital signature