Scroll to navigation

NAND_BLOCK_MARKBAD_L(9) Internal Functions Provided NAND_BLOCK_MARKBAD_L(9)

NAME

nand_block_markbad_lowlevel - mark a block bad

SYNOPSIS

int nand_block_markbad_lowlevel(struct mtd_info * mtd, loff_t ofs);

ARGUMENTS

struct mtd_info * mtd
MTD device structure

loff_t ofs

offset from device start

DESCRIPTION

This function performs the generic NAND bad block marking steps (i.e., bad block table(s) and/or marker(s)). We only allow the hardware driver to specify how to write bad block markers to OOB (chip->block_markbad).

We try operations in the following order: (1) erase the affected block, to allow OOB marker to be written cleanly (2) write bad block marker to OOB area of affected block (unless flag NAND_BBT_NO_OOB_BBM is present) (3) update the BBT Note that we retain the first error encountered in (2) or (3), finish the procedures, and dump the error in the end.

AUTHOR

Thomas Gleixner <tglx@linutronix.de>
Author.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.11