1. 27 3月, 2012 3 次提交
  2. 11 1月, 2012 1 次提交
  3. 10 1月, 2012 1 次提交
  4. 16 10月, 2011 1 次提交
    • B
      mtd: nand: initialize ops.mode · 23b1a99b
      Brian Norris 提交于
      Our `ops' information was converted to a local variable recently, and
      apparently, old code relied on the fact that the global version was
      often left in a valid mode. We can't make this assumption on local
      structs, and we shouldn't be relying on a previous state anyway.
      
      Instead, we initialize mode to 0 for don't-care situations (i.e., the
      operation does not use OOB anyway) and MTD_OPS_PLACE_OOB when we want to
      place OOB data.
      
      This fixes a bug with nand_default_block_markbad(), where we catch on
      the BUG() call in nand_fill_oob():
      
      Kernel bug detected[#1]:
      ...
      Call Trace:
      [<80307350>] nand_fill_oob.clone.5+0xa4/0x15c
      [<803075d8>] nand_do_write_oob+0x1d0/0x260
      [<803077c4>] nand_default_block_markbad+0x15c/0x1a8
      [<802e8c2c>] part_block_markbad+0x80/0x98
      [<802ebc74>] mtd_ioctl+0x6d8/0xbd0
      [<802ec1a4>] mtd_unlocked_ioctl+0x38/0x5c
      [<800d9c60>] do_vfs_ioctl+0xa4/0x6e4
      [<800da2e4>] sys_ioctl+0x44/0xa0
      [<8001381c>] stack_done+0x20/0x40
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      23b1a99b
  5. 21 9月, 2011 1 次提交
    • B
      mtd: nand: invalidate cache on unaligned reads · 6d77b9d0
      Brian Norris 提交于
      In rare cases, we are given an unaligned parameter `from' in
      `nand_do_read_ops()'. In such cases, we use the page cache
      (chip->buffers->databuf) as an intermediate buffer before dumping to the
      client buffer. However, there are also cases where this buffer is not
      cleanly reusable. In those cases, we need to make sure that we
      explicitly invalidate the cache.
      
      This patch prevents accidental reusage of the page cache, and for me,
      this solves some problems I come across when reading a corrupted BBT
      from flash (NAND_BBT_USE_FLASH and NAND_BBT_NO_OOB).
      
      Note: the rare "unaligned" case is a result of the extra BBT pattern +
      version located in the data area instead of OOB.
      
      Also, this patch disables caching on raw reads, since we are reading
      without error correction. This is, obviously, prone to errors and should
      not be cached.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      6d77b9d0
  6. 11 9月, 2011 18 次提交
  7. 25 5月, 2011 3 次提交
  8. 31 3月, 2011 1 次提交
  9. 12 3月, 2011 1 次提交
    • I
      mtd: nand: add software BCH ECC support · 193bd400
      Ivan Djelic 提交于
      This patch adds software BCH ECC support to mtd, in order to handle recent
      NAND device ecc requirements (4 bits or more).
      
      It does so by adding a new ecc mode (NAND_ECC_SOFT_BCH) for use by board
      drivers, and a new Kconfig option to enable BCH support. It relies on the
      generic BCH library introduced in a previous patch.
      
      When a board driver uses mode NAND_ECC_SOFT_BCH, it should also set fields
      chip->ecc.size and chip->ecc.bytes to select BCH ecc data size and required
      error correction capability. See nand_bch_init() documentation for details.
      
      It has been tested on the following platforms using mtd-utils, UBI and
      UBIFS: x86 (with nandsim), arm926ejs.
      Signed-off-by: NIvan Djelic <ivan.djelic@parrot.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      193bd400
  10. 11 3月, 2011 1 次提交
  11. 06 1月, 2011 4 次提交
  12. 04 12月, 2010 2 次提交
  13. 02 11月, 2010 1 次提交
  14. 25 10月, 2010 2 次提交