[U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer

Bo Shen voice.shen at atmel.com
Wed Oct 16 11:26:37 CEST 2013


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

Signed-off-by: Bo Shen <voice.shen at 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



More information about the U-Boot mailing list