All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick DELAUNAY <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH] dfu: Fix handling of UBI partitions in MTD backend
Date: Fri, 4 Sep 2020 08:31:03 +0000	[thread overview]
Message-ID: <3d869e7f0f024a568f34459f95569b68@SFHDAG6NODE3.st.com> (raw)
In-Reply-To: <20200902110606.15764-1-guille.rodriguez@gmail.com>

Hi,

> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Guillermo Rodriguez
> Sent: mercredi 2 septembre 2020 13:06
> To: u-boot at lists.denx.de
> Cc: Guillermo Rodriguez <guille.rodriguez@gmail.com>; Lukasz Majewski
> <lukma@denx.de>
> Subject: [PATCH] dfu: Fix handling of UBI partitions in MTD backend
> 
> For UBI partitions ("partubi" in dfu_alt_info), dfu_fill_entity_mtd sets the mtd.ubi
> flag; however other functions incorrectly check for nand.ubi instead. Fix this by
> checking for the correct flag.
> 
> Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
> Cc: Lukasz Majewski <lukma@denx.de>
> ---

Fixes: 6015af28ee6d ("dfu: add backend for MTD device")
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks for the correction.

Patrick

>  drivers/dfu/dfu_mtd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c index
> 36cd4e945b..2811ae8463 100644
> --- a/drivers/dfu/dfu_mtd.c
> +++ b/drivers/dfu/dfu_mtd.c
> @@ -190,7 +190,7 @@ static int dfu_flush_medium_mtd(struct dfu_entity *dfu)
>  	int ret;
> 
>  	/* in case of ubi partition, erase rest of the partition */
> -	if (dfu->data.nand.ubi) {
> +	if (dfu->data.mtd.ubi) {
>  		struct erase_info erase_op = {};
> 
>  		erase_op.mtd = dfu->data.mtd.info;
> @@ -228,7 +228,7 @@ static unsigned int dfu_polltimeout_mtd(struct dfu_entity
> *dfu)
>  	 * ubi partition, as sectors which are not used need
>  	 * to be erased
>  	 */
> -	if (dfu->data.nand.ubi)
> +	if (dfu->data.mtd.ubi)
>  		return DFU_MANIFEST_POLL_TIMEOUT;
> 
>  	return DFU_DEFAULT_POLL_TIMEOUT;
> --
> 2.21.0

  reply	other threads:[~2020-09-04  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 11:06 [PATCH] dfu: Fix handling of UBI partitions in MTD backend Guillermo Rodriguez
2020-09-04  8:31 ` Patrick DELAUNAY [this message]
2020-10-23 15:48   ` Patrick DELAUNAY
2020-10-26 15:33     ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d869e7f0f024a568f34459f95569b68@SFHDAG6NODE3.st.com \
    --to=patrick.delaunay@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.