Abhishek Sahu
693d06dffb
mtd: rawnand: fix return value check for bad block status
...
commit e9893e6fa932f42c90c4ac5849fa9aa0f0f00a34 upstream.
Positive return value from read_oob() is making false BAD
blocks. For some of the NAND controllers, OOB bytes will be
protected with ECC and read_oob() will return number of bitflips.
If there is any bitflip in ECC protected OOB bytes for BAD block
status page, then that block is getting treated as BAD.
Fixes: c120e75e0e7d ("mtd: nand: use read_oob() instead of cmdfunc() for bad block check")
Cc: <stable@vger.kernel.org>
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
[backported to 4.14.y]
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08 15:30:51 +02:00
..
2018-07-08 15:30:46 +02:00
2018-05-01 12:58:21 -07:00
2018-05-01 12:58:20 -07:00
2018-06-26 08:06:32 +08:00
2018-05-16 10:10:29 +02:00
2018-07-03 11:24:56 +02:00
2018-07-03 11:24:47 +02:00
2018-07-03 11:25:03 +02:00
2018-07-03 11:24:49 +02:00
2018-05-30 07:52:34 +02:00
2018-07-03 11:24:53 +02:00
2018-07-03 11:24:59 +02:00
2018-06-21 04:02:40 +09:00
2018-07-03 11:24:56 +02:00
2018-07-03 11:24:51 +02:00
2018-06-16 09:45:18 +02:00
2018-04-12 12:32:13 +02:00
2018-05-30 07:52:37 +02:00
2018-06-05 11:41:57 +02:00
2018-04-19 08:56:20 +02:00
2018-04-24 09:36:29 +02:00
2018-04-26 11:02:03 +02:00
2018-06-21 04:03:01 +09:00
2018-05-01 12:58:24 -07:00
2018-06-16 09:45:14 +02:00
2018-07-08 15:30:48 +02:00
2018-06-26 08:06:33 +08:00
2018-04-19 08:56:16 +02:00
2018-05-30 07:52:34 +02:00
2018-06-05 11:41:59 +02:00
2018-06-21 04:03:00 +09:00
2018-05-30 07:52:34 +02:00
2018-07-03 11:24:57 +02:00
2018-07-03 11:24:54 +02:00
2018-07-03 11:25:04 +02:00
2018-06-21 04:02:53 +09:00
2018-07-03 11:24:56 +02:00
2018-06-11 22:49:19 +02:00
2018-03-19 08:42:50 +01:00
2018-05-30 07:52:27 +02:00
2018-07-08 15:30:50 +02:00
2018-07-03 11:25:02 +02:00
2018-05-25 16:17:47 +02:00
2018-07-03 11:25:00 +02:00
2018-07-03 11:24:51 +02:00
2018-05-30 07:51:48 +02:00
2018-07-08 15:30:51 +02:00
2018-06-26 08:06:33 +08:00
2018-06-16 09:45:15 +02:00
2018-04-26 11:02:13 +02:00
2018-07-03 11:24:58 +02:00
2018-06-21 04:02:53 +09:00
2018-07-03 11:24:52 +02:00
2018-05-30 07:52:28 +02:00
2018-04-08 14:26:31 +02:00
2018-07-03 11:24:56 +02:00
2018-05-30 07:52:39 +02:00
2018-06-16 09:45:16 +02:00
2018-07-03 11:24:56 +02:00
2018-06-05 11:41:57 +02:00
2018-05-30 07:52:38 +02:00
2018-07-03 11:25:03 +02:00
2018-05-30 07:52:41 +02:00
2018-06-21 04:02:48 +09:00
2018-07-03 11:24:59 +02:00
2018-07-03 11:24:59 +02:00
2018-07-03 11:24:58 +02:00
2018-07-03 11:24:57 +02:00
2018-07-03 11:24:51 +02:00
2018-06-21 04:02:54 +09:00
2018-07-08 15:30:47 +02:00
2018-06-21 04:02:43 +09:00
2018-06-21 04:02:54 +09:00
2018-07-03 11:24:48 +02:00
2018-04-24 09:36:29 +02:00
2018-07-08 15:30:47 +02:00
2018-04-12 12:32:19 +02:00
2018-07-08 15:30:47 +02:00
2018-04-24 09:36:34 +02:00
2018-06-26 08:06:33 +08:00
2018-07-03 11:25:02 +02:00
2018-03-15 10:54:32 +01:00
2018-07-03 11:24:47 +02:00
2018-05-30 07:52:36 +02:00
2018-07-03 11:25:03 +02:00
2018-05-30 07:52:30 +02:00