Re: [PATCH 1/2] usb: gadget: composite: Race between disconnect/unbind and setup

2012-07-09 Thread Peter Chen
> > They might need to be changed. It does seems like a bad idea to tell > the gadget driver that a disconnect occurred before the host knows > about it. > Yes, it should pull down dp first, then, tell class driver, it has been disconnected. > If you change the order of those two calls, does that

Re: [PATCH 1/2] usb: gadget: composite: Race between disconnect/unbind and setup

2012-07-09 Thread Alan Stern
On Sun, 8 Jul 2012, Kevin Cernekee wrote: > On Sun, Jul 8, 2012 at 5:33 PM, Alan Stern wrote: > > On Sun, 8 Jul 2012, Kevin Cernekee wrote: > > > >> usb_gadget_remove_driver() runs through a four-step sequence to shut down > >> the gadget driver.  For the case of a composite gadget + at91 UDC, th

Re: [PATCH 1/2] usb: gadget: composite: Race between disconnect/unbind and setup

2012-07-08 Thread Kevin Cernekee
On Sun, Jul 8, 2012 at 5:33 PM, Alan Stern wrote: > On Sun, 8 Jul 2012, Kevin Cernekee wrote: > >> usb_gadget_remove_driver() runs through a four-step sequence to shut down >> the gadget driver.  For the case of a composite gadget + at91 UDC, this >> would look like: >> >>     udc->driver->disconn

Re: [PATCH 1/2] usb: gadget: composite: Race between disconnect/unbind and setup

2012-07-08 Thread Alan Stern
On Sun, 8 Jul 2012, Kevin Cernekee wrote: > usb_gadget_remove_driver() runs through a four-step sequence to shut down > the gadget driver. For the case of a composite gadget + at91 UDC, this > would look like: > > udc->driver->disconnect(udc->gadget); // composite_disconnect() >

[PATCH 1/2] usb: gadget: composite: Race between disconnect/unbind and setup

2012-07-08 Thread Kevin Cernekee
usb_gadget_remove_driver() runs through a four-step sequence to shut down the gadget driver. For the case of a composite gadget + at91 UDC, this would look like: udc->driver->disconnect(udc->gadget); // composite_disconnect() usb_gadget_disconnect(udc->gadget);// at91