Re: [PATCH 18/28] usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Oct 24, 2014 at 12:50:44PM +0900, Anton Tikhomirov wrote:
> > > > > >  		dwc3_ep0_stall_and_restart(dwc);
> > > > > >  	} else {
> > > > > > -		/*
> > > > > > -		 * handle the case where we have to send a zero
> > packet.
> > > > > This
> > > > > > -		 * seems to be case when req.length > maxpacket.
> > Could it
> > > > > be?
> > > > > > -		 */
> > > > > > -		if (r)
> > > > > > -			dwc3_gadget_giveback(ep0, r, 0);
> > > > > > +		dwc3_gadget_giveback(ep0, r, 0);
> > > > >
> > > > > Don't you want to wait until the ZLP has completed before doing
> > the
> > > > > giveback?
> > > > >
> > > > > In fact, shouldn't all this ZLP code run when the transfer is
> > > > > submitted, rather than when it completes?  The idea is that you
> > get a
> > > > > request, you queue up all the necessary TRBs or whatever, and if
> > an
> > > > > extra ZLP is needed then you queue up an extra TRB.
> > > >
> > > > You may want to check my patch one more time. I sent it for review
> > 10
> > > > monthes ago:
> > > >
> > > > [PATCH] usb: dwc3: ep0: Handle variable-length Data Stage
> > > >
> > > > It works just fine for us in our custom kernel.
> > >
> > > you also said you'd send another version (see [1]) and never did. 10
> > > months passed and I had even forgotten about this issue until I
> > decided
> > > to run all gadget drivers through USB[23]0CV and found that g_ncm
> > falls
> > > into this same bug, so I wrote the patch above.
> 
> I'm sorry about this. I was busy with current project at that time and
> finally forgot about this issue too.

I also apologize that I completely forgot about your patch, I should've
at least mentioned your work. Anyway, I'll send Greg a pull request
today. Finally finished testing everything on top of v3.18-rc1.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux