[PATCH] [JFFS2] Make NAND OOB usage more flexible

Todd Poynor tpoynor at mvista.com
Thu Jan 5 15:07:42 EST 2006


Juha Yrjölä wrote:
> +	for (i = 0; i < oob_nr; i++) {
> +		int j;
> +
> +		for (j = 0; j < oob_size; j++) {
> +			if (data_len && is_within_clean_marker_area(c, j)) {
>  				data_len--;
>  				continue;
>  			}
> -			if (buf[i*oob_size+j] != 0xFF) {
> +			if (buf[i * oob_size + j] != 0xff) {
>  				ret = 1;

Just found a reason to use AUTOPLACE info to avoid unavailable bytes 
when checking for 0xFF in the non-cleanmarker/EBH bytes as well: there's 
at least one NAND H/W controller that generates non-0xFF ECC bytes for 
writes of all 0xFF (not sure if that's a bug), and its handy to have 
such writes continue to look like an empty page.  Anyhow, holding out 
hope for Vitaly's solution, but can send a patch if this is messing 
anybody up in the meantime.

-- 
Todd




More information about the linux-mtd mailing list