On 5/2/2012 4:12 PM, 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
Ok..will send a v2 with suggested modifications.
--
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