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;
877 len = ops->len;
881 ooblen = ops->ooblen;
885 if (oobbuf && ops->mode == MTD_OPS_PLACE_OOB)
886 oobbuf += ops->ooboffs;
889 from, ops->mode, buf, len, oobbuf, ooblen);
893 ops->oobretlen = 0;
894 ops->retlen = 0;
943 (ops->mode != MTD_OPS_RAW) &&
958 ops->retlen += nbdata;
959 ops->oobretlen += nboob;
1285 * @ops: the oob operations
1289 static int doc_guess_autoecc(struct mtd_oob_ops *ops)
1293 switch (ops->mode) {
1323 * @ops: the OOB size and buffer
1334 * Returns 0 if success, -EINVAL if ops content invalid
1337 struct mtd_oob_ops *ops)
1339 int ooblen = ops->ooblen, autoecc;
1343 autoecc = doc_guess_autoecc(ops);
1349 if (ops->mode == MTD_OPS_AUTO_OOB) {
1350 doc_fill_autooob(docg3->oob_write_buf, ops->oobbuf);
1351 ops->oobretlen = 8;
1353 memcpy(docg3->oob_write_buf, ops->oobbuf, DOC_LAYOUT_OOB_SIZE);
1354 ops->oobretlen = DOC_LAYOUT_OOB_SIZE;
1364 * @ops: the mtd oob structure
1375 struct mtd_oob_ops *ops)
1379 u8 *oobbuf = ops->oobbuf;
1380 u8 *buf = ops->datbuf;
1385 len = ops->len;
1389 ooblen = ops->ooblen;
1393 if (oobbuf && ops->mode == MTD_OPS_PLACE_OOB)
1394 oobbuf += ops->ooboffs;
1397 ofs, ops->mode, buf, len, oobbuf, ooblen);
1398 switch (ops->mode) {
1416 ops->oobretlen = 0;
1417 ops->retlen = 0;
1422 return doc_backup_oob(docg3, ofs, ops);
1424 autoecc = doc_guess_autoecc(ops);
1433 else if (ooblen > 0 && ops->mode == MTD_OPS_AUTO_OOB)
1445 ops->oobretlen += oobdelta;
1447 ops->retlen += DOC_LAYOUT_PAGE_SIZE;