1. 14 6月, 2017 1 次提交
  2. 10 2月, 2017 1 次提交
  3. 09 2月, 2017 1 次提交
  4. 12 10月, 2016 1 次提交
  5. 29 9月, 2016 1 次提交
  6. 15 9月, 2016 1 次提交
    • B
      mtd: introduce the mtd_pairing_scheme concept · 477b0229
      Boris Brezillon 提交于
      MLC and TLC NAND devices are using NAND cells exposing more than one bit,
      but instead of attaching all the bits in a given cell to a single NAND
      page, each bit is usually attached to a different page. This concept is
      called 'page pairing', and has significant impacts on the flash storage
      usage.
      The main problem showed by these devices is that interrupting a page
      program operation may not only corrupt the page we are programming
      but also the page it is paired with, hence the need to expose to MTD
      users the pairing scheme information.
      
      The pairing APIs allows one to query pairing information attached to a
      given page (here called wunit), or the other way around (the wunit
      pointed by pairing information).
      It also provides several helpers to help the conversion between absolute
      offsets and wunits, and query the number of pairing groups.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Reviewed-by: NBrian Norris <computersforpeace@gmail.com>
      477b0229
  7. 20 4月, 2016 2 次提交
  8. 08 3月, 2016 1 次提交
  9. 10 12月, 2015 4 次提交
  10. 05 12月, 2015 1 次提交
  11. 20 11月, 2015 1 次提交
  12. 13 11月, 2015 1 次提交
  13. 27 10月, 2015 1 次提交
    • B
      mtd: mtdpart: Do not fail mtd probe when parsing partitions fails · 5a2415b0
      Brian Norris 提交于
      Due to wrong assumption in ofpart ofpart fails on Exynos on SPI chips
      with no partitions because the subnode containing controller data
      confuses the ofpart parser.
      
      Thus compiling in ofpart support automatically fails probing any SPI NOR
      flash without partitions on Exynos.
      
      Compiling in a partitioning scheme should not cause probe of otherwise
      valid device to fail.
      
      Instead, let's do the following:
       * try parsers until one succeeds
       * if no parser succeeds, report the first error we saw
       * even in the failure case, allow MTD to probe, with fallback
         partitions or no partitions at all -- the master device will still be
         registered
      
      Issue report and comments initially by Michal Suchanek.
      Reported-by: NMichal Suchanek <hramrach@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      5a2415b0
  14. 12 10月, 2015 1 次提交
  15. 01 10月, 2015 1 次提交
  16. 06 4月, 2015 3 次提交
  17. 21 1月, 2015 1 次提交
  18. 09 7月, 2014 2 次提交
  19. 11 3月, 2014 1 次提交
  20. 04 1月, 2014 3 次提交
  21. 31 8月, 2013 1 次提交
  22. 05 4月, 2013 2 次提交
  23. 29 9月, 2012 1 次提交
    • H
      mtd: mtdpart: break it as soon as we parse out the partitions · c51803dd
      Huang Shijie 提交于
      We may cause a memory leak when the @types has more then one parser.
      
      Take the `default_mtd_part_types` for example. The default_mtd_part_types has
      two parsers now: `cmdlinepart` and `ofpart`.
      
      Assume the following case:
      The kernel command line sets the partitions like:
      	#gpmi-nand:20m(boot),20m(kernel),1g(rootfs),-(user)
      But the devicetree file(such as arch/arm/boot/dts/imx28-evk.dts) also sets
      the same partitions as the kernel command line does.
      
      In the current code, the partitions parsed out by the `ofpart` will
      overwrite the @pparts which has already set by the `cmdlinepart` parser,
      and the the partitions parsed out by the `cmdlinepart` is missed.
      A memory leak occurs.
      
      So we should break the code as soon as we parse out the partitions,
      In actually, this patch makes a priority order between the parsers.
      If one parser has already parsed out the partitions successfully,
      it's no need to use another parser anymore.
      Signed-off-by: NHuang Shijie <shijie8@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      c51803dd
  24. 04 9月, 2012 2 次提交
  25. 14 5月, 2012 2 次提交
  26. 27 3月, 2012 3 次提交
    • M
      mtd: flash drivers set ecc strength · 6a918bad
      Mike Dunn 提交于
      Flash device drivers initialize 'ecc_strength' in struct mtd_info, which is the
      maximum number of bit errors that can be corrected in one writesize region.
      
      Drivers using the nand interface intitialize 'strength' in struct nand_ecc_ctrl,
      which is the maximum number of bit errors that can be corrected in one ecc step.
      Nand infrastructure code translates this to 'ecc_strength'.
      
      Also for nand drivers, the nand infrastructure code sets ecc.strength for ecc
      modes NAND_ECC_SOFT, NAND_ECC_SOFT_BCH, and NAND_ECC_NONE.  It is set in the
      driver for all other modes.
      Signed-off-by: NMike Dunn <mikedunn@newsguy.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      6a918bad
    • M
      mtd: fix partition wrapper functions · 994c8409
      Mike Dunn 提交于
      This patch reverts a change that may have been mistakenly included with the set
      of patches that introduced the new mtd api entry functions.  Or perhaps I am
      mistaken :)
      
      The problem is in the partition wrapper functions, where the calls to the driver
      methods were replaced with calls to the new mtd api functions.  This causes the
      api function to be called a second time, further down the call stack.  This is
      not only unnecessary and redundant - because the sanity checking code and (more
      restrictive) bounds checks for the partition were done in the first call - but
      is potentially problematic and confusing.
      
      For example, the call stack for a call to mtd_read() on a partitioned device
      currently looks like this:
      
      mtd_read()             gets struct mtd_info for the partition
      |
      +-> part_read()        via the pointer assigned when the partition was created
          |
          +->mtd_read()      this time gets struct mtd_info for the master
             |
             +->xyz_driver_read()  via the pointer asigned by the driver
      
      It seems that this can cause a variety of problems.  For example, if you want to
      add code to the api function that tests a value in mtd_info that is relevant
      only to the partition.  Or (in my case) you want the driver to return a value
      that may be different from that returned by the mtd api function.
      
      This patch eliminates the second call to the mtd api function.  It was tested on
      the docg4 nand driver with a subset of the api functions, but I inspected the
      rest and don't see any problems.
      Signed-off-by: NMike Dunn <mikedunn@newsguy.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      994c8409
    • A
      mtd: remove R/O checking duplication · 664addc2
      Artem Bityutskiy 提交于
      Many drivers check whether the partition is R/O and return -EROFS if yes.
      Let's stop having duplicated checks and move them to the API functions
      instead.
      
      And again a bit of noise - deleted few too sparse newlines, sorry.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      664addc2