summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_bbt.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2012-04-09 11:19:08 (GMT)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-29 08:14:51 (GMT)
commit52c2d9aad4923536c10d278e02da2e0254e46ee0 (patch)
tree6c921fe911b51d5356aa145dcb2ca00bedd88c60 /drivers/mtd/nand/nand_bbt.c
parent5df41de5870e2184e75a8cb133ca81888006f097 (diff)
downloadlinux-52c2d9aad4923536c10d278e02da2e0254e46ee0.tar.xz
mtd: docg3 fix in-middle of blocks reads
Corner case reads do not work, and return false data and ECC. This case is typically seen in a ubifs usage, with a read of type: - docg3 docg3: doc_read_oob(from=14882415, mode=1, data=(c30eca40:12), oob=( (null):0)) This results in the following reads: - docg3 docg3: doc_read_data_area(buf= (null), len=111) - docg3 docg3: doc_read_data_area(buf=c30eca40, len=12) - docg3 docg3: doc_read_data_area(buf= (null), len=389) - docg3 docg3: doc_read_data_area(buf= (null), len=0) - docg3 docg3: doc_read_data_area(buf= (null), len=16) If we suppose that the pages content is : - bytes 0 .. 111 : 0x0a - bytes 112 .. 255 : 0x0f Then the returned bytes will be : - 111 times 0x0a (correct) - 0x0a 2 times and 0x0f 10 times (incorrect, should be 0x0a,0x0f) - 0x0f 389 times (correct) - nothing - correct OOB The reason seams that the first 111 bytes read ends between the 2 docg3 planes, and that the first following read (in the 12 bytes sequence, read of 16 bit word) returns the byte of the rightmost plane duplicated in high and lower byte of the word. Fix this behaviour by ensuring that if the previous read ended up in-between the 2 planes, there will be a first 1 byte read to get back to the beginning of leftmost plane. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
0 files changed, 0 insertions, 0 deletions