From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 10 Jul 2015 15:02:52 -0400 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: <20150710190252.GD23886@bill-the-cat> 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, Jul 01, 2015 at 09:35:49PM +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. > > Acked-by: Heiko Schocher > Acked-by: Scott Wood > Signed-off-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: