u-boot/drivers/mtd/nand
Hector Palacios ebb7febc92 mtd: nand: fix bug writing 1 byte less than page size
nand_do_write_ops() determines if it is writing a partial page with the
formula:
	part_pagewr = (column || writelen < (mtd->writesize - 1))

When 'writelen' is exactly 1 byte less than the NAND page size the formula
equates to zero, so the code doesn't process it as a partial write, although
it should.
As a consequence the function remains in the while(1) loop with 'writelen'
becoming 0xffffffff and iterating until the watchdog timeout triggers.

To reproduce the issue on a NAND with 2K page (0x800):
	=> nand erase.part <partition>
	=> nand write $loadaddr <partition> 7ff

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-24 20:36:29 -05:00
..
am335x_spl_bch.c mtd: nand: Patch remaining places where nand_to_mtd() should be used 2016-06-19 19:28:38 -05:00
arasan_nfc.c mtd: nand: Add page argument to write_page() etc. 2016-06-03 20:27:48 -05:00
atmel_nand.c Merge git://git.denx.de/u-boot-nand-flash 2016-06-20 05:15:52 -04:00
atmel_nand_ecc.h atmel_nand_ecc: update pmecc registers according to sama5d2 chip 2016-02-02 11:49:10 +01:00
bfin_nand.c Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
davinci_nand.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
denali.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
denali.h mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
denali_spl.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
fsl_elbc_nand.c mtd: nand: Add page argument to write_page() etc. 2016-06-03 20:27:48 -05:00
fsl_elbc_spl.c Coding Style cleanup: replace leading SPACEs by TABs 2013-10-14 16:06:54 -04:00
fsl_ifc_nand.c mtd: nand: Add page argument to write_page() etc. 2016-06-03 20:27:48 -05:00
fsl_ifc_spl.c powerpc/mpc85xx: SECURE BOOT- Enable chain of trust in SPL 2016-07-21 11:09:23 -07:00
fsl_upm.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
fsmc_nand.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
kb9202_nand.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
Kconfig mtd: nand: Add the sunxi NAND controller driver 2016-07-24 20:36:28 -05:00
kirkwood_nand.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
kmeter1_nand.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
lpc32xx_nand_mlc.c mtd: nand: Patch remaining places where nand_to_mtd() should be used 2016-06-19 19:28:38 -05:00
lpc32xx_nand_slc.c mtd: nand: Add page argument to write_page() etc. 2016-06-03 20:27:48 -05:00
Makefile mtd: nand: Add the sunxi NAND controller driver 2016-07-24 20:36:28 -05:00
mpc5121_nfc.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
mxc_nand.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
mxc_nand.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mxc_nand_spl.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
mxs_nand.c Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
mxs_nand_spl.c mtd: nand: Patch remaining places where nand_to_mtd() should be used 2016-06-19 19:28:38 -05:00
nand.c nand: add nand mtd concat support 2016-06-09 13:53:12 -04:00
nand_base.c mtd: nand: fix bug writing 1 byte less than page size 2016-07-24 20:36:29 -05:00
nand_bbt.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
nand_bch.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
nand_ecc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
nand_ids.c mtd: nand: Add a full-id entry for the H27QCG8T2E5R‐BCF NAND 2016-07-24 20:36:28 -05:00
nand_plat.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
nand_spl_load.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
nand_spl_simple.c nand_spl_simple: Add a simple NAND read function 2016-07-22 09:52:59 -04:00
nand_timings.c nand: Sync with Linux v4.1 2015-08-25 22:53:57 -05:00
nand_util.c nand: nand torture: follow sync with linux v4.6 2016-06-19 19:19:30 -05:00
ndfc.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
omap_elm.c mtd: nand: omap: fix error-codes returned from omap-elm driver 2014-06-06 17:46:00 -04:00
omap_gpmc.c armv7: make gpmc_cfg const 2016-07-22 14:46:00 -04:00
pxa3xx_nand.c mtd: nand: Add page argument to write_page() etc. 2016-06-03 20:27:48 -05:00
pxa3xx_nand.h mtd: nand: Add mvebu (PXA / AXP / A38x) NAND device driver 2015-08-25 22:53:58 -05:00
s3c2410_nand.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00
sunxi_nand.c mtd: nand: Add the sunxi NAND controller driver 2016-07-24 20:36:28 -05:00
sunxi_nand_spl.c spl: nand: sunxi: add support for NAND config auto-detection 2016-06-19 19:12:02 -05:00
tegra_nand.c Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
tegra_nand.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
vf610_nfc.c mtd: nand: Sync with Linux v4.6 2016-06-03 20:27:48 -05:00