]> Git Repo - linux.git/commitdiff
Merge tag 'v3.16-rc6' into MTD development branch
authorBrian Norris <[email protected]>
Mon, 21 Jul 2014 06:59:16 +0000 (23:59 -0700)
committerBrian Norris <[email protected]>
Mon, 21 Jul 2014 07:01:16 +0000 (00:01 -0700)
Linux 3.16-rc6

1  2 
drivers/mtd/nand/nand_base.c

index 0c505dd1f522f6ba7b5880298eb5f7050b86d989,4f3e80c68a266243bad7e37aefbb819a797c6e77..d8cdf06343fbcf63d8efbe2ca126cafc444df746
@@@ -484,23 -484,6 +484,23 @@@ static int nand_check_wp(struct mtd_inf
        return (chip->read_byte(mtd) & NAND_STATUS_WP) ? 0 : 1;
  }
  
 +/**
 + * nand_block_checkbad - [GENERIC] Check if a block is marked bad
 + * @mtd: MTD device structure
 + * @ofs: offset from device start
 + *
 + * Check if the block is mark as reserved.
 + */
 +static int nand_block_isreserved(struct mtd_info *mtd, loff_t ofs)
 +{
 +      struct nand_chip *chip = mtd->priv;
 +
 +      if (!chip->bbt)
 +              return 0;
 +      /* Return info from the table */
 +      return nand_isreserved_bbt(mtd, ofs);
 +}
 +
  /**
   * nand_block_checkbad - [GENERIC] Check if a block is marked bad
   * @mtd: MTD device structure
@@@ -4064,8 -4047,10 +4064,10 @@@ int nand_scan_tail(struct mtd_info *mtd
                ecc->layout->oobavail += ecc->layout->oobfree[i].length;
        mtd->oobavail = ecc->layout->oobavail;
  
-       /* ECC sanity check: warn noisily if it's too weak */
-       WARN_ON(!nand_ecc_strength_good(mtd));
+       /* ECC sanity check: warn if it's too weak */
+       if (!nand_ecc_strength_good(mtd))
+               pr_warn("WARNING: %s: the ECC used on your system is too weak compared to the one required by the NAND chip\n",
+                       mtd->name);
  
        /*
         * Set the number of read / write steps for one page depending on ECC
        mtd->_unlock = NULL;
        mtd->_suspend = nand_suspend;
        mtd->_resume = nand_resume;
 +      mtd->_block_isreserved = nand_block_isreserved;
        mtd->_block_isbad = nand_block_isbad;
        mtd->_block_markbad = nand_block_markbad;
        mtd->writebufsize = mtd->writesize;
This page took 0.09907 seconds and 4 git commands to generate.