Re: [PATCH] usb: dwc3: Handle pending control data out correctly

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

 



On Wed, 2 May 2012, Felipe Balbi wrote:

> On Wed, May 02, 2012 at 04:11:04PM +0530, Pratyush Anand wrote:
> > On 5/2/2012 3:57 PM, Felipe Balbi wrote:
> > >>>if (transfer_size % dep->endpoint.maxpacket)
> > >>>>  >	transfer_size += transfer_size % dep->endpoint.maxpacket;
> > >>>
> > >>>  will this not make transfer_size *= 2?
> > >>>  Probably it is not intended.
> > >>>  We want to keep transfer_size to maxpacket in case of direction=0;
> > >no no, we want to make transfer_size aligned to wMaxPacketSize, so if
> > >req->request.length == 1025, we want transfer_size = 2048
> > >
> > 
> > Correct, So I was wondering if above code  does that.
> > I  think you wanted:
> > 
> > if (transfer_size % dep->endpoint.maxpacket)
> > 	transfer_size += (dep->endpoint.maxpacket - (transfer_size %
> > dep->endpoint.maxpacket));
> 
> that's correct ;-) my mistake

Doesn't the roundup() routine do what you want?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux