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));
Regards
Pratyush
--
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