Lines Matching full:oob
40 * - a 1 byte Hamming code stored in the OOB for each page
41 * - a 7 bytes BCH code stored in the OOB for each page
594 * reading OOB only or write status byte).
625 * It's in fact recv_ecc ^ calc_ecc, where recv_ecc was read from OOB
859 * @ops: the mtd oob structure
861 * Reads flash memory OOB area of pages.
888 doc_dbg("doc_read_oob(from=%lld, mode=%d, data=(%p:%zu), oob=(%p:%zu))\n", in doc_read_oob()
928 doc_dbg("OOB - INFO: %*phC\n", 7, oobbuf); in doc_read_oob()
929 doc_dbg("OOB - HAMMING: %02x\n", oobbuf[7]); in doc_read_oob()
930 doc_dbg("OOB - BCH_ECC: %*phC\n", 7, oobbuf + 8); in doc_read_oob()
931 doc_dbg("OOB - UNUSED: %02x\n", oobbuf[15]); in doc_read_oob()
1210 * @oob: buffer to get out of band bytes from (can be NULL if no OOB should be
1212 * @autoecc: if 0, all 16 bytes from OOB are taken, regardless of HW Hamming or
1215 * computations. Its value is not meaningfull is oob == NULL.
1218 * OOB data. The OOB ECC is automatically computed by the hardware Hamming and
1224 const u_char *oob, int autoecc) in doc_write_page() argument
1246 if (oob && autoecc) { in doc_write_page()
1247 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_PAGEINFO_SZ, oob); in doc_write_page()
1249 oob += DOC_LAYOUT_OOB_UNUSED_OFS; in doc_write_page()
1261 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_UNUSED_SZ, oob); in doc_write_page()
1263 if (oob && !autoecc) in doc_write_page()
1264 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_SIZE, oob); in doc_write_page()
1285 * @ops: the oob operations
1287 * Returns 0 or 1 if success, -EINVAL if invalid oob mode
1308 * doc_fill_autooob - Fill a 16 bytes OOB from 8 non-ECC bytes
1309 * @dst: the target 16 bytes OOB buffer
1310 * @oobsrc: the source 8 bytes non-ECC OOB buffer
1320 * doc_backup_oob - Backup OOB into docg3 structure
1323 * @ops: the OOB size and buffer
1325 * As the docg3 should write a page with its OOB in one pass, and some userland
1326 * applications do write_oob() to setup the OOB and then write(), store the OOB
1328 * applications could store an OOB, and then write their pages (which will
1329 * result into one having its OOB corrupted).
1332 * the page data _and_ the OOB area.
1364 * @ops: the mtd oob structure
1366 * Either write OOB data into a temporary buffer, for the subsequent write
1367 * page. The provided OOB should be 16 bytes long. If a data buffer is provided
1369 * Or provide data without OOB, and then a all zeroed OOB will be used (ECC will
1382 u8 oob[DOC_LAYOUT_OOB_SIZE]; in doc_write_oob() local
1396 doc_dbg("doc_write_oob(from=%lld, mode=%d, data=(%p:%zu), oob=(%p:%zu))\n", in doc_write_oob()
1430 memset(oob, 0, sizeof(oob)); in doc_write_oob()
1432 memcpy(oob, docg3->oob_write_buf, DOC_LAYOUT_OOB_SIZE); in doc_write_oob()
1434 doc_fill_autooob(oob, oobbuf); in doc_write_oob()
1436 memcpy(oob, oobbuf, DOC_LAYOUT_OOB_SIZE); in doc_write_oob()
1437 ret = doc_write_page(docg3, ofs, buf, oob, autoecc); in doc_write_oob()