Lines Matching full:bad
3 * Bad block table support for the NAND driver
13 * When nand_scan_bbt is called, then it tries to find the bad block table
16 * marked good / bad blocks. This information is used to create a memory BBT.
17 * Once a new bad block is discovered then the "factory" information is updated
24 * If the tables are not versioned, then we "or" the bad block information.
27 * good / bad blocks and the bad block tables are created.
32 * The auto generated bad block table is located in the last good blocks
43 * 00b: block is factory marked bad
44 * 01b, 10b: block is marked bad due to wear
46 * The memory bad block table uses the following scheme:
48 * 01b: block is marked bad due to wear
50 * 11b: block is factory marked bad
52 * Multichip devices like DOC store the bad block info per floor.
109 * Check for a pattern at the given place. Used to search bad block tables and
110 * good / bad block identifiers.
129 * Check for a pattern at the given place. Used to search bad block tables and
130 * good / bad block identifiers. Same as check_pattern, but no optional empty
161 * read_bbt - [GENERIC] Read the bad block table starting from page
169 * Read the bad block table starting from page.
234 pr_info("nand_read_bbt: bad block at 0x%012llx\n", in read_bbt()
237 /* Factory marked bad or worn out? */ in read_bbt()
254 * read_abs_bbt - [GENERIC] Read the bad block table starting at a given page
257 * @td: descriptor for the bad block table
261 * Read the bad block table for all chips starting at a given page. We assume
379 * read_abs_bbts - [GENERIC] Read the bad block table(s) for all chips starting at a given page
382 * @td: descriptor for the bad block table
383 * @md: descriptor for the bad block table mirror
385 * Read the bad block table(s) for all chips starting at a given page. We
398 pr_info("Bad block table at page %d, version 0x%02X\n", in read_abs_bbts()
407 pr_info("Bad block table at page %d, version 0x%02X\n", in read_abs_bbts()
444 * create_bbt - [GENERIC] Create a bad block table by scanning the device
447 * @bd: descriptor for the good/bad block search pattern
451 * Create a bad block table by scanning the device for the given good/bad block
462 pr_info("Scanning device for bad blocks\n"); in create_bbt()
499 pr_warn("Bad eraseblock %d at 0x%012llx\n", in create_bbt()
510 * search_bbt - [GENERIC] scan the device for a specific bad block table
513 * @td: descriptor for the bad block table
515 * Read the bad block table by searching for a given ident pattern. Search is
519 * the bad block information of this chip. This is necessary to provide support
578 pr_warn("Bad block table not found for chip %d\n", i); in search_bbt()
580 pr_info("Bad block table found at page %d, version 0x%02X\n", in search_bbt()
587 * search_read_bbts - [GENERIC] scan the device for bad block table(s)
590 * @td: descriptor for the bad block table
591 * @md: descriptor for the bad block table mirror
593 * Search and read the bad block table(s).
616 * all blocks are already used of marked bad. If td->pages[chip] was already
639 * Automatic placement of the bad block table. Search direction in get_bbt_block()
653 /* Check, if the block is bad */ in get_bbt_block()
671 * mark_bbt_block_bad - Mark one of the block reserved for BBT bad
677 * Blocks reserved for BBT can become bad. This functions is an helper to mark
678 * such blocks as bad. It takes care of updating the in-memory BBT, marking the
679 * block as bad using a bad block marker and invalidating the associated
695 pr_warn("nand_bbt: error %d while marking block %d bad\n", in mark_bbt_block_bad()
702 * write_bbt - [GENERIC] (Re)write the bad block table
705 * @td: descriptor for the bad block table
706 * @md: descriptor for the bad block table mirror
709 * (Re)write the bad block table.
733 /* Write bad block table per chip rather than per device? */ in write_bbt()
754 pr_err("No space left to write bad block table\n"); in write_bbt()
794 pr_info("nand_bbt: error reading block for writing the bad block table\n"); in write_bbt()
797 pr_warn("nand_bbt: ECC error while reading block for writing bad block table\n"); in write_bbt()
875 pr_info("Bad block table written to 0x%012llx, version 0x%02X\n", in write_bbt()
884 pr_warn("nand_bbt: error while writing bad block table %d\n", res); in write_bbt()
889 * nand_memory_bbt - [GENERIC] create a memory based bad block table
891 * @bd: descriptor for the good/bad block search pattern
894 * manufacturer / software marked good / bad blocks.
907 * @bd: descriptor for the good/bad block search pattern
968 /* Create the bad block table by scanning the device? */ in check_create()
1014 /* Write the bad block table to the device? */ in check_create()
1021 /* Write the mirror bad block table to the device? */ in check_create()
1032 * mark_bbt_regions - [GENERIC] mark the bad block table regions
1034 * @td: bad block table descriptor
1036 * The bad block table regions are marked as "bad" to prevent accidental
1092 * verify_bbt_descr - verify the bad block description
1096 * This functions performs a few sanity checks on the bad block description
1140 * nand_scan_bbt - [NAND Interface] scan, find, read and maybe create bad block table(s)
1142 * @bd: descriptor for the good/bad block search pattern
1144 * The function checks, if a bad block table(s) is/are already available. If
1145 * not it scans the device for manufacturer marked good / bad blocks and writes
1146 * the bad block table(s) to the selected place.
1148 * The bad block table memory is allocated here. It must be freed by calling
1161 * Allocate memory (2bit per block) and clear the memory bad block in nand_scan_bbt()
1170 * memory based bad block table. in nand_scan_bbt()
1195 /* Search the bad block table using a pattern in oob */ in nand_scan_bbt()
1218 * nand_update_bbt - update bad block table(s)
1222 * The function updates the bad block table(s).
1256 /* Write the bad block table to the device? */ in nand_update_bbt()
1262 /* Write the mirror bad block table to the device? */ in nand_update_bbt()
1273 * Define some generic bad / good block scan pattern which are used
1274 * while scanning a device for factory marked good / bad blocks.
1336 pr_warn("Bad block pattern already allocated; not replacing\n"); in nand_create_badblock_pattern()
1352 * nand_create_bbt - [NAND Interface] Select a default bad block table for the device
1355 * This function selects the default bad block table support for the device and
1362 /* Is a flash based bad block table requested? */ in nand_create_bbt()
1404 * nand_isbad_bbt - [NAND Interface] Check if a block is bad
1407 * @allowbbt: allow access to bad block table region
1432 * nand_markbad_bbt - [NAND Interface] Mark a block bad in the BBT
1434 * @offs: offset of the bad block
1443 /* Mark bad block in memory */ in nand_markbad_bbt()
1446 /* Update flash-based bad block table */ in nand_markbad_bbt()