u-boot-brain/drivers/dfu
Patrick Delaunay a5bb384caa dfu: dfu_mtd: remove the mtd_block_op error when mtd_lock is not supported
Fix the result of DFU_OP_WRITE operation in mtd_block_op function
when mtd_lock is not supported (-EOPNOTSUPP) to avoid DFU stack
error on the DFU manifestation of the MTD device, when
dfu_flush_medium_mtd is called.

Without this patch, dfu-util failed on dfuERROR state at the end
of the write operation on the alternate even if MTD write
opeartion is correctly performed.

$> dfu-util -a 3 -D test.bin
....
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
....
Download	[=========================] 100%       225469 bytes
Download done.
state(10) = dfuERROR, status(14) = Something went wrong,
  but the device does not know what it was Done!

Fixes: 65f3fc18fc ("dfu_mtd: Add provision to unlock mtd device")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2021-05-28 11:21:51 +02:00
..
Kconfig dfu: simplify the dependencies of DFU_TFTP 2020-11-21 07:26:16 +01:00
Makefile dfu: rename dfu_tftp_write() to dfu_write_by_name() 2020-10-30 14:20:27 +01:00
dfu.c dfu: add 'SCRIPT' entity 2021-01-31 14:08:56 +01:00
dfu_alt.c dfu: add dfu_write_by_alt() 2020-10-30 14:20:27 +01:00
dfu_mmc.c dfu: add 'SCRIPT' entity 2021-01-31 14:08:56 +01:00
dfu_mtd.c dfu: dfu_mtd: remove the mtd_block_op error when mtd_lock is not supported 2021-05-28 11:21:51 +02:00
dfu_nand.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu_ram.c dfu: fix dfu tftp on sandbox 2020-09-01 14:47:43 +02:00
dfu_sf.c dfu: dfu_sf: avoid double free of SPI device 2021-03-25 20:15:30 +01:00
dfu_virt.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00