From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 6 Jul 2015 16:30:33 -0500 Subject: [U-Boot] [PATCH] mtd: fix false positive "Offset exceeds device limit" error In-Reply-To: <1435754149-19462-1-git-send-email-yamada.masahiro@socionext.com> References: <1435754149-19462-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <1436218233.2658.9.camel@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 2015-07-01 at 21:35 +0900, Masahiro Yamada wrote: > Since commit 09c3280754f8 (mtd, nand: Move common functions from > cmd_nand.c to common place), NAND commands would not work at all > on large devices. > > => nand read 80000000 10000 10000 > > NAND read: Offset exceeds device limit > => nand erase 100000 100000 > > NAND erase: Offset exceeds device limit > > The type of the "size" of "struct mtd_info" is uint64_t, while > mtd_arg_off_size() and mtd_arg_off() treat chipsize as int type. > The chipsize is wrapped around if the argument is given with 2GB > or larger. > > Signed-off-by: Masahiro Yamada > --- > > drivers/mtd/mtd_uboot.c | 5 +++-- > include/linux/mtd/mtd.h | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) Acked-by: Scott Wood I'm assuming this patch will be merged via whatever tree merged the breakage... -Scott