mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
[MTD] Introduce writesize
At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
This commit is contained in:
@@ -87,13 +87,13 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
|
||||
|
||||
/* No need to read pages fully,
|
||||
* just read required OOB bytes */
|
||||
ret = mtd->read_oob(mtd, from + j * mtd->oobblock + bd->offs,
|
||||
ret = mtd->read_oob(mtd, from + j * mtd->writesize + bd->offs,
|
||||
readlen, &retlen, &buf[0]);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->oobblock, bd)) {
|
||||
if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) {
|
||||
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
|
||||
printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
|
||||
i >> 1, (unsigned int) from);
|
||||
|
||||
Reference in New Issue
Block a user