[U-Boot] [PATCH v5 2/9] dfu: Support larger than memory transfers.

Tom Rini trini at ti.com
Wed Mar 13 16:25:42 CET 2013


On Mon, Mar 11, 2013 at 11:03:41AM +0100, Lukasz Majewski wrote:

[snip]
> > > -	if (blk_seq_num == 0) {
> > > -		i_buf = dfu_buf;
> > > -		ret = dfu->read_medium(dfu, i_buf, &r_size);
> > > -		debug("%s: %s %ld [B]\n", __func__, dfu->name,
> > > r_size);
> > > -		i_blk_seq_num = 0;
> > > -		/* Integrity check (if needed) */
> > > -		crc = crc32(0, dfu_buf, r_size);
> > > +	       __func__, dfu->name, buf, size, blk_seq_num,
> > > dfu->i_buf); +
> > > +	if (!dfu->inited) {
> > > +		ret = dfu->read_medium(dfu, 0, NULL, &dfu->r_left);
> 			   ^^^^^^^^^^^^ this call causes read error. I
> 			   suppose, that it is an initial "read". Does
> 			   it read the whole file at once?
> 
> 		The problem is that the command is fromatted in a
> 		wrong way. 

And we're also passing NULL as the buffer to read into?  That also can't
be good.  I'll spend a little time here and see what's going on.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130313/50cf9255/attachment.pgp>


More information about the U-Boot mailing list