Lines Matching defs:ops

859  * @ops: the mtd oob structure
866 struct mtd_oob_ops *ops)
870 u8 *oobbuf = ops->oobbuf;
871 u8 *buf = ops->datbuf;
878 len = ops->len;
882 ooblen = ops->ooblen;
886 if (oobbuf && ops->mode == MTD_OPS_PLACE_OOB)
887 oobbuf += ops->ooboffs;
890 from, ops->mode, buf, len, oobbuf, ooblen);
894 ops->oobretlen = 0;
895 ops->retlen = 0;
945 (ops->mode != MTD_OPS_RAW) &&
960 ops->retlen += nbdata;
961 ops->oobretlen += nboob;
971 if (ops->stats) {
972 ops->stats->uncorrectable_errors +=
974 ops->stats->corrected_bitflips +=
1293 * @ops: the oob operations
1297 static int doc_guess_autoecc(struct mtd_oob_ops *ops)
1301 switch (ops->mode) {
1331 * @ops: the OOB size and buffer
1342 * Returns 0 if success, -EINVAL if ops content invalid
1345 struct mtd_oob_ops *ops)
1347 int ooblen = ops->ooblen, autoecc;
1351 autoecc = doc_guess_autoecc(ops);
1357 if (ops->mode == MTD_OPS_AUTO_OOB) {
1358 doc_fill_autooob(docg3->oob_write_buf, ops->oobbuf);
1359 ops->oobretlen = 8;
1361 memcpy(docg3->oob_write_buf, ops->oobbuf, DOC_LAYOUT_OOB_SIZE);
1362 ops->oobretlen = DOC_LAYOUT_OOB_SIZE;
1372 * @ops: the mtd oob structure
1383 struct mtd_oob_ops *ops)
1387 u8 *oobbuf = ops->oobbuf;
1388 u8 *buf = ops->datbuf;
1393 len = ops->len;
1397 ooblen = ops->ooblen;
1401 if (oobbuf && ops->mode == MTD_OPS_PLACE_OOB)
1402 oobbuf += ops->ooboffs;
1405 ofs, ops->mode, buf, len, oobbuf, ooblen);
1406 switch (ops->mode) {
1424 ops->oobretlen = 0;
1425 ops->retlen = 0;
1430 return doc_backup_oob(docg3, ofs, ops);
1432 autoecc = doc_guess_autoecc(ops);
1441 else if (ooblen > 0 && ops->mode == MTD_OPS_AUTO_OOB)
1453 ops->oobretlen += oobdelta;
1455 ops->retlen += DOC_LAYOUT_PAGE_SIZE;