Brian Norris
28fa65e643
mtd: nand: fix off-by-one read retry mode counting
A flash may support N read retry voltage threshold modes, numbered 0
through N-1 (where mode 0 represents the initial state). However,
nand_do_read_ops() tries to use mode 0 through N.
This off-by-one error shows up, for instance, when using nanddump, and
we have cycled through available modes:
nand: setting READ RETRY mode 0
nand: setting READ RETRY mode 1
nand: setting READ RETRY mode 2
nand: setting READ RETRY mode 3
nand: setting READ RETRY mode 4
nand: setting READ RETRY mode 5
nand: setting READ RETRY mode 6
nand: setting READ RETRY mode 7
nand: setting READ RETRY mode 8
libmtd: error!: cannot read 8192 bytes from mtd0 (eraseblock 20, offset 0)
error 22 (Invalid argument)
nanddump: error!: mtd_read
Tested on Micron MT29F64G08CBCBBH1, with 8 retry modes.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
2014-02-14 12:08:20 -08:00
..
2013-11-06 23:32:56 -08:00
2014-01-27 21:55:03 -08:00
2013-08-05 20:58:30 +01:00
2013-08-05 21:07:41 +01:00
2014-01-07 10:07:03 -08:00
2014-01-03 11:22:29 -08:00
2014-01-03 11:22:29 -08:00
2014-01-03 11:22:29 -08:00
2014-01-03 11:22:29 -08:00
2014-01-03 11:22:29 -08:00
2014-01-03 11:22:30 -08:00
2014-01-03 11:22:27 -08:00
2014-01-09 08:52:48 -08:00
2014-01-11 12:20:15 -08:00
2014-01-11 12:20:15 -08:00
2014-01-03 11:22:30 -08:00
2013-11-15 16:47:22 -08:00
2014-01-11 12:07:35 -08:00
2014-01-11 12:07:35 -08:00
2013-10-09 20:04:04 -05:00
2014-01-07 10:07:03 -08:00
2014-01-07 10:07:34 -08:00
2014-01-03 11:22:30 -08:00
2014-01-03 11:22:26 -08:00
2014-01-07 10:06:58 -08:00
2014-01-07 10:07:00 -08:00
2013-08-30 21:51:57 +01:00
2014-01-30 17:07:18 -08:00
2014-01-11 12:20:06 -08:00
2014-02-14 12:08:20 -08:00
2013-11-06 23:33:14 -08:00
2014-01-20 11:30:52 -08:00
2013-11-14 12:31:43 +09:00
2013-10-09 20:04:04 -05:00
2014-01-20 11:38:13 -08:00
2014-01-07 10:07:35 -08:00
2014-01-07 10:07:31 -08:00
2014-01-03 11:22:09 -08:00
2014-01-20 11:37:29 -08:00
2014-01-20 11:20:47 -08:00
2013-11-15 09:32:21 +09:00
2014-01-22 17:31:57 -08:00
2014-01-07 10:07:02 -08:00
2014-01-07 10:07:31 -08:00
2013-08-30 16:47:52 +01:00
2013-11-14 12:31:43 +09:00
2014-01-03 11:22:28 -08:00
2014-01-03 11:22:30 -08:00