When doing memory read transfers there will always be 64 bytes transferred, even when less bytes are requested. This is expected and there is a test skipping the error message in this case. The test is wrong though since cnt is not decremented and will never be equal to rem. Fix the test so that verifying memory does not give a bogus error message. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- scripts/imx/imx-usb-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index 499e8c8ec6..6052343e00 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx-usb-loader.c @@ -635,7 +635,7 @@ static int read_memory(unsigned addr, void *dest, unsigned cnt) break; } if ((last_trans > rem) || (last_trans > 64)) { - if ((last_trans == 64) && (cnt == rem)) { + if ((last_trans == 64) && (rem < 64)) { /* Last transfer is expected to be too large for HID */ } else { printf("err: %02x %02x %02x %02x cnt=%u rem=%d last_trans=%i\n", -- 2.11.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox