GPMI-NAND: Wrong ECC size in driver

Scott Wood scottwood at freescale.com
Tue Jan 31 14:09:13 EST 2012


On 01/31/2012 11:30 AM, Brian Norris wrote:
> There's another distinct possibility (one that I use on an out-of-tree
> driver): instead of calling "nand_scan()", separate it into its two
> sub-functions "nand_scan_ident()" and "nand_scan_tail()" so you have
> something like this
> 
>     ret = nand_scan_ident(mtd, pdata->max_chip_count, NULL);
>     chip->options |= NAND_NO_SUBPAGE_WRITE;
>     if (!ret)
>             ret = nand_scan_tail(mtd);
> 
> That way your option is set after we mask with NAND_CHIPOPTIONS_MSK. I'm
> not sure if this solution is better than really trying to tackle the
> issue of why we have that mask and whether it is still needed, but it
> solves the problem.


It's a bit hackish, but should work.  Why not get just rid of the mask,
though, if it's not actually doing anything constructive and is
requiring such workarounds?

-Scott




More information about the linux-mtd mailing list