On Tuesday, March 18, 2014 at 07:51:05 AM, Lukasz Majewski wrote: > Hi Marek, > > > On Monday, March 17, 2014 at 11:56:16 AM, Heiko Schocher wrote: > > > move the flushing code into an extra function dfu_flush(), > > > so it can be used from other code. > > > > > > Signed-off-by: Heiko Schocher <h...@denx.de> > > > Cc: Lukasz Majewski <l.majew...@samsung.com> > > > Cc: Kyungmin Park <kyungmin.p...@samsung.com> > > > Cc: Marek Vasut <ma...@denx.de> > > > Cc: Pantelis Antoniou <pa...@antoniou-consulting.com> > > > > [...] > > > > > @@ -199,23 +221,7 @@ int dfu_write(struct dfu_entity *dfu, void > > > *buf, int size, int blk_seq_num) > > > > > > /* end? */ > > > if (size == 0) { > > > > > > - /* Now try and flush to the medium if needed. */ > > > - if (dfu->flush_medium) > > > - ret = dfu->flush_medium(dfu); > > > - printf("\nDFU complete CRC32: 0x%08x\n", dfu->crc); > > > - > > > - /* clear everything */ > > > - dfu_free_buf(); > > > - dfu->crc = 0; > > > - dfu->offset = 0; > > > - dfu->i_blk_seq_num = 0; > > > - dfu->i_buf_start = dfu_buf; > > > - dfu->i_buf_end = dfu_buf; > > > - dfu->i_buf = dfu->i_buf_start; > > > - > > > - dfu->inited = 0; > > > - > > > - } > > > + ret = dfu_flush(dfu, buf, size, blk_seq_num); > > > > This seems broken, at least because you didn't close the opened brace > > (see 'if (size == 0) {' .... I can fix this up when applying. > > I was prepared to pull those patches to u-boot-dfu repo today and test > them :-). > > Afterwards, I would send PR to Tom. > > Are you OK with this?
Doesn't -dfu go through -usb ? ;-) Or do you want to send to Tom directly ? Either way WFM. Nonetheless, I picked the patches via -usb, they're in master now. > > Do you want this in 2014.04 or in -next ? > > After testing I would go for 2014.04, if Tom doesn't mind. All in all > it "fixes" the DFU state machine - by adding missing states. Up till > now we had short cut in the DFU state machine. OK Best regards, Marek Vasut _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot