public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer
@ 2013-10-16  9:26 Bo Shen
  2013-10-16  9:26 ` [U-Boot] [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value Bo Shen
  2013-10-19  0:44 ` [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer Marek Vasut
  0 siblings, 2 replies; 10+ messages in thread
From: Bo Shen @ 2013-10-16  9:26 UTC (permalink / raw)
  To: u-boot

The value of dfu->r_left need decrease along with the transfer

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 drivers/dfu/dfu.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 56b21c7..65c6984 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -229,6 +229,7 @@ static int dfu_read_buffer_fill(struct dfu_entity *dfu, void *buf, int size)
 			dfu->crc = crc32(dfu->crc, buf, chunk);
 			dfu->i_buf += chunk;
 			dfu->b_left -= chunk;
+			dfu->r_left -= chunk;
 			size -= chunk;
 			buf += chunk;
 			readn += chunk;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-11-06 13:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16  9:26 [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer Bo Shen
2013-10-16  9:26 ` [U-Boot] [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value Bo Shen
2013-11-04 10:17   ` Lukasz Majewski
2013-11-05  9:48     ` Bo Shen
2013-11-06  8:54       ` Lukasz Majewski
2013-11-06 13:51         ` Marek Vasut
2013-10-19  0:44 ` [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer Marek Vasut
2013-10-21 22:24   ` Lukasz Majewski
2013-10-22  2:42     ` Marek Vasut
2013-11-01  1:18       ` Bo Shen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox