'\" t .\" Title: nand_block_markbad_lowlevel .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: April 2019 .\" Manual: Internal Functions Provided .\" Source: Kernel Hackers Manual 4.9.168 .\" Language: English .\" .TH "NAND_BLOCK_MARKBAD_L" "9" "April 2019" "Kernel Hackers Manual 4\&.9\&." "Internal Functions Provided" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" nand_block_markbad_lowlevel \- mark a block bad .SH "SYNOPSIS" .HP \w'int\ nand_block_markbad_lowlevel('u .BI "int nand_block_markbad_lowlevel(struct\ mtd_info\ *\ " "mtd" ", loff_t\ " "ofs" ");" .SH "ARGUMENTS" .PP \fImtd\fR .RS 4 MTD device structure .RE .PP \fIofs\fR .RS 4 offset from device start .RE .SH "DESCRIPTION" .PP 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)\&. .PP 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\&. .SH "AUTHOR" .PP \fBThomas Gleixner\fR <\&tglx@linutronix.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br