Lines Matching refs:erase_block_no
408 unsigned int erase_block_no; member
806 unsigned int erase_block_no; in ns_parse_badblocks() local
814 erase_block_no = simple_strtoul(w, &w, 0); in ns_parse_badblocks()
815 if (!zero_ok && !erase_block_no) { in ns_parse_badblocks()
819 offset = (loff_t)erase_block_no * ns->geom.secsz; in ns_parse_badblocks()
834 unsigned int erase_block_no; in ns_parse_weakblocks() local
843 erase_block_no = simple_strtoul(w, &w, 0); in ns_parse_weakblocks()
844 if (!zero_ok && !erase_block_no) { in ns_parse_weakblocks()
860 wb->erase_block_no = erase_block_no; in ns_parse_weakblocks()
867 static int ns_erase_error(unsigned int erase_block_no) in ns_erase_error() argument
872 if (wb->erase_block_no == erase_block_no) { in ns_erase_error()
994 static void ns_update_wear(unsigned int erase_block_no) in ns_update_wear() argument
1005 erase_block_wear[erase_block_no] += 1; in ns_update_wear()
1006 if (erase_block_wear[erase_block_no] == 0) in ns_update_wear()
1007 NS_ERR("Erase counter overflow for erase block %u\n", erase_block_no); in ns_update_wear()
1575 unsigned int erase_block_no, page_no; in ns_do_state_action() local
1635 erase_block_no = ns->regs.row >> (ns->geom.secshift - ns->geom.pgshift); in ns_do_state_action()
1639 NS_LOG("erase sector %u\n", erase_block_no); in ns_do_state_action()
1646 ns_update_wear(erase_block_no); in ns_do_state_action()
1648 if (ns_erase_error(erase_block_no)) { in ns_do_state_action()
1649 NS_WARN("simulating erase failure in erase block %u\n", erase_block_no); in ns_do_state_action()