1. 03 10月, 2018 3 次提交
  2. 05 9月, 2018 13 次提交
  3. 28 8月, 2018 1 次提交
    • M
      mtd: rawnand: denali: do not pass zero maxchips to nand_scan() · 336d139f
      Masahiro Yamada 提交于
      Commit 49aa76b1 ("mtd: rawnand: do not execute nand_scan_ident()
      if maxchips is zero") gave a new meaning for calling nand_scan_ident()
      with maxchips=0.
      
      It is a special usage for some drivers such as docg4, but actually
      the Denali driver may pass maxchips=0 to nand_scan() when the driver
      is enabled but no NAND chip is found on the board for some reasons.
      
      If nand_scan_with_ids() is called with maxchips=0, nand_scan_ident()
      is skipped, then nand_set_defaults() is skipped as well.  Thus, the
      driver must set chip->controller beforehand.  Otherwise, nand_attach()
      causes NULL pointer dereference.
      
      In fact, the Denali controller knows the number of connected chips
      before calling nand_scan_ident(); if DEVICE_RESET fails, there is no
      chip in that chip select.  Then, denali_reset_banks() sets the maxchips
      to the number of detected chips.  If no chip is found, maxchips is zero.
      
      In this case, there is no point for calling nand_scan() because we know
      it will fail for sure.  Let's make the probe function fail immediately.
      
      Fixes: 49aa76b1 ("mtd: rawnand: do not execute nand_scan_ident() if maxchips is zero")
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      336d139f
  4. 27 8月, 2018 1 次提交
    • G
      mtd: rawnand: docg4: Remove wrong __init annotations · 166cd442
      Geert Uytterhoeven 提交于
      If gcc (e.g. 4.1.2) decides not to inline init_mtd_structs() and
      read_id_reg(), this will cause section mismatches, and crashes:
      
          WARNING: drivers/mtd/nand/raw/docg4.o(.text+0xc10): Section mismatch in reference from the function docg4_attach_chip() to the function .init.text:init_mtd_structs()
          The function docg4_attach_chip() references
          the function __init init_mtd_structs().
          This is often because docg4_attach_chip lacks a __init
          annotation or the annotation of init_mtd_structs is wrong.
      
          WARNING: drivers/mtd/nand/raw/docg4.o(.text+0xc3e): Section mismatch in reference from the function docg4_attach_chip() to the function .init.text:read_id_reg()
          The function docg4_attach_chip() references
          the function __init read_id_reg().
          This is often because docg4_attach_chip lacks a __init
          annotation or the annotation of read_id_reg is wrong.
      
      Fix this by dropping the now incorrect __init annotations from
      init_mtd_structs() and read_id_reg().
      
      Fixes: 66a38478 ("mtd: rawnand: docg4: convert driver to nand_scan()")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      166cd442
  5. 12 8月, 2018 1 次提交
  6. 01 8月, 2018 1 次提交
  7. 31 7月, 2018 20 次提交