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

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

 



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

-- 
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