u-boot-brain/drivers/mtd
T Karthik Reddy 1e2c5bb9e7 mtd: nand: Fix nand write error with bad block addresses above 32-bit
Nand writes should skip the bad blocks with "nand write" command.
In case of bad blocks with above 32-bit address, nand_block_isbad()
returns false due to truncated bad block address.

In below code segment,

	if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1)))

offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is
happening. Cast 'mtd->erasesize' with loff_t to fix this issue.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-09-11 17:13:56 -04:00
..
nand mtd: nand: Fix nand write error with bad block addresses above 32-bit 2020-09-11 17:13:56 -04:00
onenand common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi mtd: spi-nor: Tidy up error handling / debug code 2020-08-03 22:19:54 -04:00
ubi common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
ubispl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
altera_qspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
cfi_flash.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cfi_mtd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hbmc-am654.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig configs: migrate CONFIG_SYS_MTDPARTS_RUNTIME to defconfigs 2020-05-08 09:16:26 -04:00
Makefile mtd: Makefile: deep cleanup 2019-12-04 17:10:51 -05:00
mtd_uboot.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mtd-uclass.c mtd: uclass: add probe function 2018-10-02 22:12:31 +05:30
mtdconcat.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: mtdpart: use uint64_t instead of int for cur_off 2020-07-17 10:47:19 -04:00
mw_eeprom.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pic32_flash.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
renesas_rpc_hf.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
st_smi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00