Lines Matching refs:instr
207 static int gluebi_erase(struct mtd_info *mtd, struct erase_info *instr) in gluebi_erase() argument
213 dbg_gen("erase %llu bytes at offset %llu", (unsigned long long)instr->len, in gluebi_erase()
214 (unsigned long long)instr->addr); in gluebi_erase()
216 if (instr->addr < 0 || instr->addr > mtd->size - mtd->erasesize) in gluebi_erase()
219 if (instr->len < 0 || instr->addr + instr->len > mtd->size) in gluebi_erase()
222 if (mtd_mod_by_ws(instr->addr, mtd) || mtd_mod_by_ws(instr->len, mtd)) in gluebi_erase()
225 lnum = mtd_div_by_eb(instr->addr, mtd); in gluebi_erase()
226 count = mtd_div_by_eb(instr->len, mtd); in gluebi_erase()
248 instr->state = MTD_ERASE_DONE; in gluebi_erase()
249 mtd_erase_callback(instr); in gluebi_erase()
253 instr->state = MTD_ERASE_FAILED; in gluebi_erase()
254 instr->fail_addr = (long long)lnum * mtd->erasesize; in gluebi_erase()