Re: [PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Alan Stern
On Wed, 12 Nov 2008, Anton Vorontsov wrote: > On Wed, Nov 12, 2008 at 11:12:18PM +0300, Anton Vorontsov wrote: > > On Wed, Nov 12, 2008 at 10:59:16PM +0300, Anton Vorontsov wrote: > > [...] > > > > And wouldn't it be better to _skip_ doing this if the gadget wasn't > > > > connected before? > > >

Re: [PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Anton Vorontsov
On Wed, Nov 12, 2008 at 11:12:18PM +0300, Anton Vorontsov wrote: > On Wed, Nov 12, 2008 at 10:59:16PM +0300, Anton Vorontsov wrote: > [...] > > > And wouldn't it be better to _skip_ doing this if the gadget wasn't > > > connected before? > > > > Composite framework handles this. If there were no

Re: [PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Anton Vorontsov
On Wed, Nov 12, 2008 at 10:59:16PM +0300, Anton Vorontsov wrote: [...] > > And wouldn't it be better to _skip_ doing this if the gadget wasn't > > connected before? > > Composite framework handles this. If there were no connections, > then the disconnect() is a nop (except the spin lock/unlock pa

Re: [PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Anton Vorontsov
On Wed, Nov 12, 2008 at 02:38:02PM -0500, Alan Stern wrote: > On Wed, 12 Nov 2008, Anton Vorontsov wrote: > > > Gadgets disable endpoints in their disconnect callbacks, so > > we must call disconnect before unbinding. This also fixes > > muram memory leak, since we free muram in the qe_ep_disable(

Re: [PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Alan Stern
On Wed, 12 Nov 2008, Anton Vorontsov wrote: > Gadgets disable endpoints in their disconnect callbacks, so > we must call disconnect before unbinding. This also fixes > muram memory leak, since we free muram in the qe_ep_disable(). > --- a/drivers/usb/gadget/fsl_qe_udc.c > +++ b/drivers/usb/gadget

[PATCH] usb/fsl_qe_udc: Report disconnect before unbinding

2008-11-12 Thread Anton Vorontsov
Gadgets disable endpoints in their disconnect callbacks, so we must call disconnect before unbinding. This also fixes muram memory leak, since we free muram in the qe_ep_disable(). But mainly the patch fixes following badness: [EMAIL PROTECTED]:~# insmod fsl_qe_udc.ko fsl_qe_udc: Freescale QE/CPM