
31 Dec
2008
31 Dec
'08
2:19 a.m.
I thought it would be better to check whether chip->ecc.size equal 0 here, I forgot to set ecc.size in board_nand_init() and it trigs a div0 hang.
driver/mtd/nand/nand_base.c 2786 /* 2787 * Set the number of read / write steps for one page depending on ECC 2788 * mode 2789 */ 2790 chip->ecc.steps = mtd->writesize / chip->ecc.size; 2791 if(chip->ecc.steps * chip->ecc.size != mtd->writesize) { 2792 printk(KERN_WARNING "Invalid ecc parameters\n"); 2793 BUG(); 2794 } 2795 chip->ecc.total = chip->ecc.steps * chip->ecc.bytes; 2796
--
FIXME if it is wrong.