[PATCH] Set default transfer size to 1024 bytes

Stefan Schmidt stefan at datenfreihafen.org
Mon Nov 8 12:21:22 CET 2010


Hello.

On Fri, 2010-11-05 at 23:03, Tormod Volden wrote:
> From: Tormod Volden <debian.tormod at gmail.com>
> 
> It used to default to the host kernel page size, which seems rather
> irrelevant. 1024 bytes seems like a reasonable default size, if one is
> needed. At any rate, it should really be determined from the DFU
> functional descriptor, so this default should not matter much.

Same comment on the commit message as on your first patch.

> ---
> 
> Another patch for dfu-util
> 
> Hopefully my previous patch makes this default transfer size
> irrelevant in almost all cases :)
> 
> Anyway, 1024 is a safer choice than 4096 which the previous
> logic would provide on most (Linux) boxen.

Why do you think that 1024 is more safe here. I'm not really against this patch
and my testing showed that it breaks nothing for me but I wonder what it should
help.


> -	if (transfer_size > page_size)
> -		transfer_size = page_size;
> +	/* FIXME: Ensure bMaxPacketSize0 <= transfer_size <= wTransferSize */

I was hoping we could reduce the FIXMEs instead adding new ones. :)

regards
Stefan Schmidt



More information about the devel mailing list