u-boot/drivers/mtd
Martin Krause af56730153 cfi_flash: fix bug with flash banks with different sector numbers
The function find_sector() does not take into account if the flash bank
has changed since the last call. This could lead to illegal accesses inside
and beyond the flash_info_t info strcture. For example if the current
flash bank has less sectors than the last used flash bank.

This patch adds two cheks. One that insures, that the current sector does
not exceed the allowed maximum (which is always a good idea). And one that
checks if the current access is to the same flash bank as the last access.
If not, the search loop will start with sector 0.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-03-28 19:06:51 +02:00
..
nand Minor Coding Style Cleanup. 2011-02-02 22:36:10 +01:00
onenand Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
spi sf: winbond: add support for W25Q16/32/128 parts 2010-12-17 08:53:55 -05:00
ubi Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
at45.c drivers/mtd: Move conditional compilation to Makefile 2008-08-13 01:40:42 +02:00
cfi_flash.c cfi_flash: fix bug with flash banks with different sector numbers 2011-03-28 19:06:51 +02:00
cfi_mtd.c cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT 2010-09-20 15:09:00 +02:00
dataflash.c mtd/dataflash.c: fix a problem with the last partition 2008-12-02 21:53:24 +01:00
jedec_flash.c add AM29F400BB to table of supported legacy flashs 2011-01-11 10:43:31 +01:00
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
mtdconcat.c mtd: Add MTD concat support to concatenate multiple MTD NOR devices 2009-06-12 20:45:47 +02:00
mtdcore.c Followup fixes on the mtdparts spread patchset 2010-10-11 15:11:01 -05:00
mtdpart.c nand: remove dead code and suspend/resume 2010-10-11 15:10:35 -05:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
spr_smi.c mod change 755 => 644 for multiple files 2010-03-21 22:22:53 +01:00