From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Mon, 06 Oct 2014 10:20:43 +0200 Subject: [U-Boot] [PATCH] cfi_flash: don't hide write/erase errors In-Reply-To: <20141006061901.GD2567@sapphire.tkos.co.il> References: <20141006061901.GD2567@sapphire.tkos.co.il> Message-ID: <543250DB.9010402@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Baruch, On 06.10.2014 08:19, Baruch Siach wrote: > 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 >> Signed-off-by: Baruch Siach >> --- >> 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? Sorry, I forgot about this one. I have to admit that I'm a bit hesitant here. Since your patch changes the behavior thats present for about than 6 years. You're the first encountering some problems here. And I'm not that actively using CFI NOR flash anymore as well, so my knowledge is a bit "rusty" here as well. Could you please summarize again, what the real problem with this compare is. What is the error exactly in your case (which flash chip is used and which command was issued?)? Thanks, Stefan