mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
usb: dfu: decrease dfu->r_left along with the transfer
The value of dfu->r_left need decrease along with the transfer Signed-off-by: Bo Shen <voice.shen@atmel.com>
This commit is contained in:
@ -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->crc = crc32(dfu->crc, buf, chunk);
|
||||||
dfu->i_buf += chunk;
|
dfu->i_buf += chunk;
|
||||||
dfu->b_left -= chunk;
|
dfu->b_left -= chunk;
|
||||||
|
dfu->r_left -= chunk;
|
||||||
size -= chunk;
|
size -= chunk;
|
||||||
buf += chunk;
|
buf += chunk;
|
||||||
readn += chunk;
|
readn += chunk;
|
||||||
|
Reference in New Issue
Block a user