[U-Boot] [PATCH] mtd: fix false positive "Offset exceeds device limit" error

Scott Wood scottwood at freescale.com
Mon Jul 6 23:30:33 CEST 2015


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 <yamada.masahiro at socionext.com>
> ---
> 
>  drivers/mtd/mtd_uboot.c | 5 +++--
>  include/linux/mtd/mtd.h | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)

Acked-by: Scott Wood <scottwood at freescale.com>

I'm assuming this patch will be merged via whatever tree merged the 
breakage...

-Scott



More information about the U-Boot mailing list