correctly handle cases where the usb chunksize is smaller than the
combined write
This commit is contained in:
parent
4af4753dc4
commit
85690a3f99
@ -114,9 +114,9 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase,
|
|||||||
int len;
|
int len;
|
||||||
DPRINTF("writing %d bytes due to %d following reads in %d chunks or full buffer\n", writepos-writebuf, nread, num);
|
DPRINTF("writing %d bytes due to %d following reads in %d chunks or full buffer\n", writepos-writebuf, nread, num);
|
||||||
|
|
||||||
|
while (pos < writepos) {
|
||||||
len = writepos-pos;
|
len = writepos-pos;
|
||||||
|
|
||||||
while (pos < writepos) {
|
|
||||||
if (len > usb_maxlen)
|
if (len > usb_maxlen)
|
||||||
len = usb_maxlen;
|
len = usb_maxlen;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user