public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] altera_qspi: initialize instr.mtd in flash_erase
Date: Fri, 18 Dec 2015 14:50:52 +0100	[thread overview]
Message-ID: <201512181450.52429.marex@denx.de> (raw)
In-Reply-To: <1450445764-11567-1-git-send-email-thomas@wytron.com.tw>

On Friday, December 18, 2015 at 02:36:04 PM, Thomas Chou wrote:
> Initialize instr.mtd in flash_erase(). This fixes the system
> hang issue when CONFIG_MTD_PARTITIONS is selected.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  drivers/mtd/altera_qspi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
> index 617bf5d..c7e37ad 100644
> --- a/drivers/mtd/altera_qspi.c
> +++ b/drivers/mtd/altera_qspi.c
> @@ -81,6 +81,7 @@ int flash_erase(flash_info_t *info, int s_first, int
> s_last) int ret;
> 
>  	memset(&instr, 0, sizeof(instr));
> +	instr.mtd = mtd;
>  	instr.addr = mtd->erasesize * s_first;
>  	instr.len = mtd->erasesize * (s_last + 1 - s_first);
>  	ret = mtd_erase(mtd, &instr);

Nice, took me a while to grasp where the bug triggers, but now I see it:

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

      reply	other threads:[~2015-12-18 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 13:36 [U-Boot] [PATCH] altera_qspi: initialize instr.mtd in flash_erase Thomas Chou
2015-12-18 13:50 ` Marek Vasut [this message]

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=201512181450.52429.marex@denx.de \
    --to=marex@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox