From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sughosh Ganu Date: Wed, 19 May 2021 11:37:23 +0530 Subject: [PATCH v4 12/14] dfu_mtd: Ignore non-implemented lock device failure In-Reply-To: <162140319389.47256.629728945246178860.stgit@localhost> References: <162140306116.47256.6799058439792039400.stgit@localhost> <162140319389.47256.629728945246178860.stgit@localhost> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 19 May 2021 at 11:16, Masami Hiramatsu wrote: > Ignore the non-implemented lock device failure on writing mtd > via DFU. Without this fix, DFU write shows an error on such device > even if it succeeded, because dfu->write_medium returns -EOPNOTSUPP. > > Signed-off-by: Masami Hiramatsu > Cc: Lukasz Majewski > --- > drivers/dfu/dfu_mtd.c | 2 ++ > 1 file changed, 2 insertions(+) > A patch has already been submitted for this[1]. Patrick, can you please apply this in your tree and send it as part of the next PR. Thanks. -sughosh [1] - https://lists.denx.de/pipermail/u-boot/2021-March/443896.html > diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c > index ca67585a7e..e58302c32d 100644 > --- a/drivers/dfu/dfu_mtd.c > +++ b/drivers/dfu/dfu_mtd.c > @@ -152,6 +152,8 @@ static int mtd_block_op(enum dfu_op op, struct > dfu_entity *dfu, > ret = mtd_lock(mtd, lock_ofs, lock_len); > if (ret && ret != -EOPNOTSUPP) > printf("MTD device lock failed\n"); > + if (ret == -EOPNOTSUPP) > + ret = 0; > } > return ret; > } > >