1. 01 Jun, 2012 4 commits
  2. 29 May, 2012 2 commits
    • Dmitry Maluka's avatar
      mtd: nand: fix scan_read_raw_oob · 34a5704d
      Dmitry Maluka authored
      It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which
      should cause wrong functioning of NAND_BBT_SCANALLPAGES option.
      
      Artem: the patch did not apply and I had to amend it a bit.
      Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: stable@kernel.org
      34a5704d
    • Robert Jarzmik's avatar
      mtd: docg3 fix in-middle of blocks reads · 52c2d9aa
      Robert Jarzmik authored
      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: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      52c2d9aa
  3. 14 May, 2012 34 commits