1. 07 11月, 2013 1 次提交
  2. 30 8月, 2013 1 次提交
  3. 07 7月, 2012 2 次提交
  4. 27 3月, 2012 1 次提交
    • B
      mtd: nand: write BBM to OOB even with flash-based BBT · e2414f4c
      Brian Norris 提交于
      Currently, the flash-based BBT implementation writes bad block data only
      to its flash-based table and not to the OOB marker area. Then, as new bad
      blocks are marked over time, the OOB markers become incomplete and the
      flash-based table becomes the only source of current bad block
      information. This becomes an obvious problem when, for example:
      
       * bootloader cannot read the flash-based BBT format
       * BBT is corrupted and the flash must be rescanned for bad
         blocks; we want to remember bad blocks that were marked from Linux
      
      So to keep the bad block markers in sync with the flash-based BBT, this
      patch changes the default so that we write bad block markers to the proper
      OOB area on each block in addition to flash-based BBT. Comments are
      updated, expanded, and/or relocated as necessary.
      
      The new flash-based BBT procedure for marking bad blocks:
       (1) erase the affected block, to allow OOB marker to be written cleanly
       (2) update in-memory BBT
       (3) write bad block marker to OOB area of affected block
       (4) update flash-based BBT
      Note that we retain the first error encountered in (3) or (4), finish the
      procedures, and dump the error in the end.
      
      This should handle power cuts gracefully enough. (1) and (2) are mostly
      harmless (note that (1) will not erase an already-recognized bad block).
      The OOB and BBT may be "out of sync" if we experience power loss bewteen
      (3) and (4), but we can reasonably expect that on next boot, subsequent
      I/O operations will discover that the block should be marked bad again,
      thus re-syncing the OOB and BBT.
      
      Note that this is a change from the previous default flash-based BBT
      behavior. If your system cannot support writing bad block markers to OOB,
      use the new NAND_BBT_NO_OOB_BBM option (in combination with
      NAND_BBT_USE_FLASH and NAND_BBT_NO_OOB).
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      e2414f4c
  5. 11 9月, 2011 7 次提交
  6. 25 10月, 2010 2 次提交
  7. 09 8月, 2010 1 次提交
  8. 02 8月, 2010 2 次提交
    • B
      mtd: nand: more BB Detection refactoring and dynamic scan options · 58373ff0
      Brian Norris 提交于
      This is a revision to PATCH 2/2 that I sent. Link:
      http://lists.infradead.org/pipermail/linux-mtd/2010-July/030911.html
      
      Added new flag for scanning of both bytes 1 and 6 of the OOB for
      a BB marker (instead of simply one or the other).
      
      The "check_pattern" and "check_short_pattern" functions were updated
      to include support for scanning the two different locations in the OOB.
      
      In order to handle increases in variety of necessary scanning patterns,
      I implemented dynamic memory allocation of nand_bbt_descr structs
      in new function 'nand_create_default_bbt_descr()'. This replaces
      some increasingly-unwieldy, statically-declared descriptors. It can
      replace several more (e.g. "flashbased" structs). However, I do not
      test the flashbased options personally.
      
      How this was tested:
      
      I referenced 30+ data sheets (covering 100+ parts), and I tested a
      selection of 10 different chips to varying degrees. Particularly, I
      tested the creation of bad-block descriptors and basic BB scanning on
      three parts:
      
      ST NAND04GW3B2D, 2K page
      ST NAND128W3A, 512B page
      Samsung K9F1G08U0A, 2K page
      
      To test these, I wrote some fake bad block markers to the flash (in OOB
      bytes 1, 6, and elsewhere) to see if the scanning routine would detect
      them properly. However, this method was somewhat limited because the
      driver I am using has some bugs in its OOB write functionality.
      Signed-off-by: NBrian Norris <norris@broadcom.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      58373ff0
    • B
      mtd: nand: edit macro flag for BBT scan of last page in block · 30fe8115
      Brian Norris 提交于
      NAND_BB_LAST_PAGE used to be in nand.h, but it pertained to bad block
      management and so belongs next to NAND_BBT_SCAN2NDPAGE in bbm.h. Also,
      its previous flag value (0x00000400) conflicted with NAND_BBT_SCANALLPAGES
      so I changed its value to 0x00008000. All uses of the name were modified to
      provide consistency with other "NAND_BBT_*" flags.
      Signed-off-by: NBrian Norris <norris@broadcom.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      30fe8115
  9. 25 9月, 2009 1 次提交
  10. 07 2月, 2007 1 次提交
  11. 29 6月, 2006 1 次提交
  12. 07 11月, 2005 2 次提交