1. 03 10月, 2018 18 次提交
  2. 18 7月, 2018 1 次提交
  3. 29 4月, 2018 1 次提交
  4. 25 4月, 2018 2 次提交
    • T
      mtd: rawnand: diskonchip: Allocate rs control per instance · 964dfce9
      Thomas Gleixner 提交于
      The reed solomon library is moving the on stack decoder buffers into the rs
      control structure. That would break the DoC driver because multiple
      instances share the same control structure and can operate in parallel. At
      least in theory....
      
      Instantiate a rs control instance per DoC device to avoid that. The per
      instance buffer is fine as the operation on a single DoC instance is
      serialized by the MTD/NAND core.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Andrew Morton <akpm@linuxfoundation.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Alasdair Kergon <agk@redhat.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      964dfce9
    • T
      rslib: Split rs control struct · 21633981
      Thomas Gleixner 提交于
      The decoder library uses variable length arrays on stack. To get rid of
      them it would be simple to allocate fixed length arrays on stack, but those
      might become rather large. The other solution is to allocate the buffers in
      the rs control structure, but this cannot be done as long as the structure
      can be shared by several users. Sharing is desired because the RS polynom
      tables are large and initialization is time consuming.
      
      To solve this split the codec information out of the control structure and
      have a pointer to a shared codec in it. Instantiate the control structure
      for each user, create a new codec if no shareable is avaiable yet.  Adjust
      all affected usage sites to the new scheme.
      
      This allows to add per instance decoder buffers to the control structure
      later on.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Andrew Morton <akpm@linuxfoundation.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Alasdair Kergon <agk@redhat.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      21633981
  5. 15 3月, 2018 1 次提交
  6. 16 2月, 2018 2 次提交
  7. 14 12月, 2017 1 次提交
  8. 18 9月, 2017 1 次提交
  9. 13 8月, 2017 1 次提交
  10. 06 5月, 2016 1 次提交
  11. 11 3月, 2016 1 次提交
    • A
      mtd: nand: don't select chip in nand_chip's block_bad op · 9f3e0429
      Archit Taneja 提交于
      One of the arguments passed to struct nand_chip's block_bad op is
      'getchip', which, if true, is supposed to get and select the nand device,
      and later unselect and release the device.
      
      This op is intended to be replaceable by drivers. The drivers shouldn't
      be responsible for selecting/unselecting chip. Like other ops, the chip
      should already be selected before the block_bad op is called.
      
      Remove the getchip argument from the block_bad op and
      nand_block_checkbad. Move the chip selection to nand_block_isbad, since it
      is the only caller to nand_block_checkbad which requires chip selection.
      
      Modify nand_block_bad (the default function for the op) such that it
      doesn't select the chip.
      
      Remove the getchip argument from the bad_block funcs in cafe_nand,
      diskonchip and docg4 drivers.
      Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      9f3e0429
  12. 08 1月, 2016 1 次提交
  13. 07 1月, 2016 1 次提交
  14. 19 12月, 2015 2 次提交
  15. 09 12月, 2015 1 次提交
  16. 11 8月, 2015 1 次提交
  17. 17 6月, 2015 1 次提交
    • B
      mtd: diskonchip: remove two-phase partitioning / registration · 6a7c7334
      Brian Norris 提交于
      It is a Bad Idea (TM) to call mtd_device_register() or
      mtd_device_parse_register() twice on the same master MTD. Among other
      things, it makes partition overrides (e.g., cmdlinepart) much more
      difficult.
      
      Since commit 727dc612 ("mtd: part: Create the master device node
      when partitioned"), we now have a config option that accomplishes the
      same purpose as the double-registration done in diskonchip.c -- it
      forces the master MTD to *always* be registered, while partitions may
      optionally show up in addition. Eventually, we might like to make
      CONFIG_MTD_PARTITIONED_MASTER into the default, but this could be
      disruptive to user-space expectations of MTD numbering, so we'll take
      that slowly.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Alexander Shiyan <shc_work@mail.ru>
      6a7c7334
  18. 07 5月, 2015 1 次提交
    • B
      mtd: diskonchip: don't call nand_scan_bbt() directly · d24fe0c3
      Brian Norris 提交于
      The diskonchip driver almost uses the default nand_base hooks as-is,
      except that it provides custom on-flash BBT descriptors and avoids using
      factory-marked bad blockers.
      
      So let's refactor the BBT initialization code into a private 'late_init'
      hook which handles all the private details. Note the usage of
      NAND_SKIP_BBTSCAN, which allows us to defer the BBT scan until we've
      prepared everything.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      d24fe0c3
  19. 01 4月, 2014 1 次提交
  20. 11 3月, 2014 1 次提交
    • B
      mtd: nand: force NAND_CMD_READID onto 8-bit bus · 3dad2344
      Brian Norris 提交于
      The NAND command helpers tend to automatically shift the column address
      for x16 bus devices, since most commands expect a word address, not a
      byte address. The Read ID command, however, expects an 8-bit address
      (i.e., 0x00, 0x20, or 0x40 should not be translated to 0x00, 0x10, or
      0x20).
      
      This fixes the column address for a few drivers which imitate the
      nand_base defaults. Note that I don't touch sh_flctl.c, since it already
      handles this problem slightly differently (note its comment "READID is
      always performed using an 8-bit bus").
      
      I have not tested this patch, as I only have x8 parts up for testing at
      this point. Hopefully that can change soon...
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Tested-By: NPekon Gupta <pekon@ti.com>
      3dad2344