Explorar el Código

usb:gadget:f_thor: fix write to filesystem by add dfu_flush()

Since dfu read/write operations needs to be flushed manually,
writing to filesystem on MMC by thor was broken. MMC raw write
actually is working fine because current dfu_flush() function
writes filesystem only. This commit adds dfu_flush() to f_thor
and now filesystem write is working.

This change was tested on Trats2 board.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Przemyslaw Marczak hace 11 años
padre
commit
fd2a89b20b
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      drivers/usb/gadget/f_thor.c

+ 6 - 0
drivers/usb/gadget/f_thor.c

@@ -229,6 +229,12 @@ static int download_tail(long long int left, int cnt)
 	if (ret)
 		error("DFU write failed [%d] cnt: %d", ret, cnt);
 
+	ret = dfu_flush(dfu_entity, transfer_buffer, 0, cnt);
+	if (ret) {
+		error("DFU flush failed!");
+		return ret;
+	}
+
 	return ret;
 }