public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cfi_flash: don't hide write/erase errors
Date: Mon, 6 Oct 2014 09:19:01 +0300	[thread overview]
Message-ID: <20141006061901.GD2567@sapphire.tkos.co.il> (raw)
In-Reply-To: <d4639ffb4c3a7ec8391e3c2eea7d13b32d55094e.1409822589.git.baruch@tkos.co.il>

Hi Stefan,

On Thu, Sep 04, 2014 at 12:23:09PM +0300, Baruch Siach wrote:
> Partially revert commit 0d01f66d235118 (CFI: cfi_flash write fix for AMD
> legacy).
> 
> flash_full_status_check() used to skip status register parsing when
> flash_status_check() returns OK. This is wrong since flash_status_check()
> must return OK for other status bits to be valid.
> 
> Cc: Ed Swarthout <Ed.Swarthout@freescale.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  drivers/mtd/cfi_flash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index c4b5bc1de553..9b3175d87fbd 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -593,7 +593,7 @@ static int flash_full_status_check (flash_info_t * info, flash_sect_t sector,
>  	case CFI_CMDSET_INTEL_PROG_REGIONS:
>  	case CFI_CMDSET_INTEL_EXTENDED:
>  	case CFI_CMDSET_INTEL_STANDARD:
> -		if ((retcode != ERR_OK)
> +		if ((retcode == ERR_OK)
>  		    && !flash_isequal (info, sector, 0, FLASH_STATUS_DONE)) {
>  			retcode = ERR_INVAL;
>  			printf ("Flash %s error at address %lx\n", prompt,

Ping?

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2014-10-06  6:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  9:23 [U-Boot] [PATCH] cfi_flash: don't hide write/erase errors Baruch Siach
2014-10-06  6:19 ` Baruch Siach [this message]
2014-10-06  8:20   ` Stefan Roese
2014-10-06 11:32     ` Baruch Siach
2014-10-06 12:09       ` Stefan Roese
2014-10-06 16:28 ` Edward L Swarthout

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=20141006061901.GD2567@sapphire.tkos.co.il \
    --to=baruch@tkos.co.il \
    --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