[PATCH 8/8] mtd: nand: use ECC, if present, when scanning OOB

Shmulik Ladkani shmulik.ladkani at gmail.com
Tue Jun 26 10:09:02 EDT 2012


Hi,

On Fri, 22 Jun 2012 16:35:45 -0700 Brian Norris <computersforpeace at gmail.com> wrote:
> scan_read_raw_oob() is used in only in places where the MTD_OPS_PLACE_OOB
> mode is preferable MTD_OPS_RAW mode, so use MTD_OPS_PLACE_OOB instead.

Please consider rephrasing, text is bit confusing.

> + * Scan read data from data+OOB. May traverse multiple pages, interleaving
> + * page,OOB,page,OOB,... in buf.

In the case 'len' is less than 'mtd->writesize' (possible from a
'scan_block_full' call), the read oob will be placed immediately after
the partially read page, quoting scan_read_raw_oob:

		ops.len = min(len, (size_t)mtd->writesize);
		ops.oobbuf = buf + ops.len;

Any idea if this is intentional or a bug?

Regards,
Shmulik



More information about the linux-mtd mailing list