| /kernel/linux/linux-6.6/tools/testing/selftests/net/af_unix/ |
| D | test_unix_oob.c | 134 /* Test 1: Test for SIGURG and OOB */ in producer() 142 /* Test 2: Test for OOB being overwitten */ in producer() 167 /* Test 4: Test for 1byte OOB msg */ in producer() 182 char oob; in main() local 222 * read, oob is '@', and POLLPRI works. in main() 225 read_oob(pfd, &oob); in main() 227 if (!signal_recvd || len != 63 || oob != '@') { in main() 229 signal_recvd, len, oob); in main() 237 * Verify that the first OOB is over written by in main() 238 * the 2nd one and the first OOB is returned as in main() [all …]
|
| /kernel/linux/linux-6.6/drivers/mtd/parsers/ |
| D | sharpslpart.c | 35 /* oob structure */ 69 /* verify that the OOB bytes 8 to 15 are free and available for the FTL */ 115 * The logical block number assigned to a physical block is stored in the OOB 128 * ECC BB xyxy oob[8]==oob[10] && oob[9]==oob[11] -> byte0=8 byte1=9 129 * ECC BB xyxy oob[10]==oob[12] && oob[11]==oob[13] -> byte0=10 byte1=11 130 * ECC BB xy xy oob[12]==oob[8] && oob[13]==oob[9] -> byte0=12 byte1=13 132 static int sharpsl_nand_get_logical_num(u8 *oob) in sharpsl_nand_get_logical_num() argument 137 if (oob[NAND_NOOB_LOGADDR_00] == oob[NAND_NOOB_LOGADDR_10] && in sharpsl_nand_get_logical_num() 138 oob[NAND_NOOB_LOGADDR_01] == oob[NAND_NOOB_LOGADDR_11]) { in sharpsl_nand_get_logical_num() 141 } else if (oob[NAND_NOOB_LOGADDR_10] == oob[NAND_NOOB_LOGADDR_20] && in sharpsl_nand_get_logical_num() [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/parsers/ |
| D | sharpslpart.c | 35 /* oob structure */ 69 /* verify that the OOB bytes 8 to 15 are free and available for the FTL */ 115 * The logical block number assigned to a physical block is stored in the OOB 128 * ECC BB xyxy oob[8]==oob[10] && oob[9]==oob[11] -> byte0=8 byte1=9 129 * ECC BB xyxy oob[10]==oob[12] && oob[11]==oob[13] -> byte0=10 byte1=11 130 * ECC BB xy xy oob[12]==oob[8] && oob[13]==oob[9] -> byte0=12 byte1=13 132 static int sharpsl_nand_get_logical_num(u8 *oob) in sharpsl_nand_get_logical_num() argument 137 if (oob[NAND_NOOB_LOGADDR_00] == oob[NAND_NOOB_LOGADDR_10] && in sharpsl_nand_get_logical_num() 138 oob[NAND_NOOB_LOGADDR_01] == oob[NAND_NOOB_LOGADDR_11]) { in sharpsl_nand_get_logical_num() 141 } else if (oob[NAND_NOOB_LOGADDR_10] == oob[NAND_NOOB_LOGADDR_20] && in sharpsl_nand_get_logical_num() [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/nand/raw/ |
| D | sm_common.h | 9 /* Full oob structure as written on the flash */ 24 /* oob area is also 16 bytes, but might be from two pages */ 39 static inline int sm_sector_valid(struct sm_oob *oob) in sm_sector_valid() argument 41 return hweight16(oob->data_status) >= 5; in sm_sector_valid() 44 static inline int sm_block_valid(struct sm_oob *oob) in sm_block_valid() argument 46 return hweight16(oob->block_status) >= 7; in sm_block_valid() 49 static inline int sm_block_erased(struct sm_oob *oob) in sm_block_erased() argument 55 if (!memcmp(oob, erased_pattern, sizeof(*oob))) in sm_block_erased()
|
| D | nand_base.c | 340 * nand_fill_oob - [INTERN] Transfer client buffer to oob 342 * @oob: oob data buffer 343 * @len: oob data write length 344 * @ops: oob ops structure 346 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, size_t len, in nand_fill_oob() argument 353 * Initialise to all 0xFF, to avoid the possibility of left over OOB in nand_fill_oob() 354 * data from a previous OOB read. in nand_fill_oob() 362 memcpy(chip->oob_poi + ops->ooboffs, oob, len); in nand_fill_oob() 363 return oob + len; in nand_fill_oob() 366 ret = mtd_ooblayout_set_databytes(mtd, oob, chip->oob_poi, in nand_fill_oob() [all …]
|
| D | sunxi_nand.c | 534 * the randomizer engine does internally before de/scrambling OOB data. 716 static void sunxi_nfc_hw_ecc_get_prot_oob_bytes(struct nand_chip *nand, u8 *oob, in sunxi_nfc_hw_ecc_get_prot_oob_bytes() argument 722 oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 726 sunxi_nfc_randomize_bbm(nand, page, oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 730 const u8 *oob, int step, in sunxi_nfc_hw_ecc_set_prot_oob_bytes() argument 738 memcpy(user_data, oob, sizeof(user_data)); in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 740 oob = user_data; in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 743 writel(sunxi_nfc_buf_to_user_data(oob), in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 760 static int sunxi_nfc_hw_ecc_correct(struct nand_chip *nand, u8 *data, u8 *oob, in sunxi_nfc_hw_ecc_correct() argument 785 if (oob) in sunxi_nfc_hw_ecc_correct() [all …]
|
| /kernel/linux/linux-6.6/drivers/mtd/nand/raw/ |
| D | sm_common.h | 9 /* Full oob structure as written on the flash */ 24 /* oob area is also 16 bytes, but might be from two pages */ 39 static inline int sm_sector_valid(struct sm_oob *oob) in sm_sector_valid() argument 41 return hweight16(oob->data_status) >= 5; in sm_sector_valid() 44 static inline int sm_block_valid(struct sm_oob *oob) in sm_block_valid() argument 46 return hweight16(oob->block_status) >= 7; in sm_block_valid() 49 static inline int sm_block_erased(struct sm_oob *oob) in sm_block_erased() argument 55 if (!memcmp(oob, erased_pattern, sizeof(*oob))) in sm_block_erased()
|
| D | nand_base.c | 379 * nand_fill_oob - [INTERN] Transfer client buffer to oob 381 * @oob: oob data buffer 382 * @len: oob data write length 383 * @ops: oob ops structure 385 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, size_t len, in nand_fill_oob() argument 392 * Initialise to all 0xFF, to avoid the possibility of left over OOB in nand_fill_oob() 393 * data from a previous OOB read. in nand_fill_oob() 401 memcpy(chip->oob_poi + ops->ooboffs, oob, len); in nand_fill_oob() 402 return oob + len; in nand_fill_oob() 405 ret = mtd_ooblayout_set_databytes(mtd, oob, chip->oob_poi, in nand_fill_oob() [all …]
|
| D | sunxi_nand.c | 544 * the randomizer engine does internally before de/scrambling OOB data. 715 static void sunxi_nfc_hw_ecc_get_prot_oob_bytes(struct nand_chip *nand, u8 *oob, in sunxi_nfc_hw_ecc_get_prot_oob_bytes() argument 721 oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 725 sunxi_nfc_randomize_bbm(nand, page, oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 729 const u8 *oob, int step, in sunxi_nfc_hw_ecc_set_prot_oob_bytes() argument 737 memcpy(user_data, oob, sizeof(user_data)); in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 739 oob = user_data; in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 742 writel(sunxi_nfc_buf_to_user_data(oob), in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 759 static int sunxi_nfc_hw_ecc_correct(struct nand_chip *nand, u8 *data, u8 *oob, in sunxi_nfc_hw_ecc_correct() argument 784 if (oob) in sunxi_nfc_hw_ecc_correct() [all …]
|
| /kernel/linux/linux-6.6/drivers/mtd/ |
| D | sm_ftl.c | 127 /* ----------------------- oob helpers -------------------------------------- */ 148 static int sm_read_lba(struct sm_oob *oob) in sm_read_lba() argument 157 if (!memcmp(oob, erased_pattern, SM_OOB_SIZE)) in sm_read_lba() 161 lba_test = *(uint16_t *)oob->lba_copy1 ^ *(uint16_t*)oob->lba_copy2; in sm_read_lba() 166 lba = sm_get_lba(oob->lba_copy1); in sm_read_lba() 169 lba = sm_get_lba(oob->lba_copy2); in sm_read_lba() 174 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) in sm_write_lba() argument 186 oob->lba_copy1[0] = oob->lba_copy2[0] = tmp[0]; in sm_write_lba() 187 oob->lba_copy1[1] = oob->lba_copy2[1] = tmp[1]; in sm_write_lba() 217 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) in sm_correct_sector() argument [all …]
|
| D | nftlcore.c | 121 * Read oob data from flash 142 * Write oob data to flash 165 * Write data and oob to flash 168 size_t *retlen, uint8_t *buf, uint8_t *oob) in nftl_write() argument 177 ops.oobbuf = oob; in nftl_write() 241 struct nftl_oob oob; in NFTL_foldchain() local 268 (char *)&oob); in NFTL_foldchain() 270 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; in NFTL_foldchain() 281 status = oob.b.Status | oob.b.Status1; in NFTL_foldchain() 380 oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); in NFTL_foldchain() [all …]
|
| D | inftlcore.c | 134 * Read oob data from flash 154 * Write oob data to flash 174 * Write data and oob to flash 177 size_t *retlen, uint8_t *buf, uint8_t *oob) in inftl_write() argument 185 ops.oobbuf = oob; in inftl_write() 244 struct inftl_oob oob; in INFTL_foldchain() local 274 (char *)&oob) < 0) in INFTL_foldchain() 277 status = oob.b.Status | oob.b.Status1; in INFTL_foldchain() 347 memset(&oob, 0xff, sizeof(struct inftl_oob)); in INFTL_foldchain() 348 oob.b.Status = oob.b.Status1 = SECTOR_USED; in INFTL_foldchain() [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/ |
| D | sm_ftl.c | 127 /* ----------------------- oob helpers -------------------------------------- */ 148 static int sm_read_lba(struct sm_oob *oob) in sm_read_lba() argument 157 if (!memcmp(oob, erased_pattern, SM_OOB_SIZE)) in sm_read_lba() 161 lba_test = *(uint16_t *)oob->lba_copy1 ^ *(uint16_t*)oob->lba_copy2; in sm_read_lba() 166 lba = sm_get_lba(oob->lba_copy1); in sm_read_lba() 169 lba = sm_get_lba(oob->lba_copy2); in sm_read_lba() 174 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) in sm_write_lba() argument 186 oob->lba_copy1[0] = oob->lba_copy2[0] = tmp[0]; in sm_write_lba() 187 oob->lba_copy1[1] = oob->lba_copy2[1] = tmp[1]; in sm_write_lba() 217 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) in sm_correct_sector() argument [all …]
|
| D | nftlcore.c | 121 * Read oob data from flash 142 * Write oob data to flash 165 * Write data and oob to flash 168 size_t *retlen, uint8_t *buf, uint8_t *oob) in nftl_write() argument 177 ops.oobbuf = oob; in nftl_write() 241 struct nftl_oob oob; in NFTL_foldchain() local 268 (char *)&oob); in NFTL_foldchain() 270 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; in NFTL_foldchain() 281 status = oob.b.Status | oob.b.Status1; in NFTL_foldchain() 380 oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); in NFTL_foldchain() [all …]
|
| D | inftlcore.c | 134 * Read oob data from flash 154 * Write oob data to flash 174 * Write data and oob to flash 177 size_t *retlen, uint8_t *buf, uint8_t *oob) in inftl_write() argument 185 ops.oobbuf = oob; in inftl_write() 244 struct inftl_oob oob; in INFTL_foldchain() local 274 (char *)&oob) < 0) in INFTL_foldchain() 277 status = oob.b.Status | oob.b.Status1; in INFTL_foldchain() 347 memset(&oob, 0xff, sizeof(struct inftl_oob)); in INFTL_foldchain() 348 oob.b.Status = oob.b.Status1 = SECTOR_USED; in INFTL_foldchain() [all …]
|
| /kernel/linux/linux-6.6/include/uapi/mtd/ |
| D | mtd-abi.h | 52 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default) 53 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas 73 * @ooblen: length of OOB buffer (only lower 32 bits are used) 75 * @usr_oob: user-provided OOB buffer 79 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB 80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to 118 * @ooblen: length of OOB buffer (only lower 32 bits are used) 120 * @usr_oob: user-provided OOB buffer 125 * This structure supports ioctl(MEMREAD) operations, allowing data and/or OOB 126 * reads in various modes. To read from OOB-only, set @usr_data == NULL, and to [all …]
|
| /kernel/linux/linux-5.10/include/linux/mtd/ |
| D | bbm.h | 24 * @offs: offset of the pattern in the oob area of the page 25 * @veroffs: offset of the bbt version counter in the oob are of the page 38 * that the pattern and the version count are always located in the oob area 73 * unavailable, for example, if the NAND controller has a different data and OOB 84 * Use a flash based bad block table. By default, OOB identifier is saved in 85 * OOB area. This option is passed to the default bad block table function. 89 * Do not store flash based bad block table marker in the OOB area; store it 94 * Do not write new bad block markers to OOB; useful, e.g., when ECC covers
|
| /kernel/linux/linux-6.6/include/linux/mtd/ |
| D | bbm.h | 24 * @offs: offset of the pattern in the oob area of the page 25 * @veroffs: offset of the bbt version counter in the oob are of the page 38 * that the pattern and the version count are always located in the oob area 73 * unavailable, for example, if the NAND controller has a different data and OOB 84 * Use a flash based bad block table. By default, OOB identifier is saved in 85 * OOB area. This option is passed to the default bad block table function. 89 * Do not store flash based bad block table marker in the OOB area; store it 94 * Do not write new bad block markers to OOB; useful, e.g., when ECC covers
|
| /kernel/linux/linux-5.10/include/uapi/mtd/ |
| D | mtd-abi.h | 52 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default) 53 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas 73 * @ooblen: length of OOB buffer 75 * @usr_oob: user-provided OOB buffer 79 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB 80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to 134 __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ 174 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */ 196 /* Write data to OOB (64-bit version) */ 198 /* Read data from OOB (64-bit version) */ [all …]
|
| /kernel/linux/linux-6.6/drivers/media/dvb-frontends/ |
| D | mxl692_defs.h | 88 /* OOB */ 147 /* OOB */ 232 /* Enum of MPEG Data format, used in MPEG and OOB output configuration */ 241 /* Enum of MPEG Clock format, used in MPEG and OOB output configuration */ 286 /* Enum of Demodulator IQ setup, used in QAM, OOB configuration and status */ 293 /* Enum of OOB Demodulator symbol rates, used in OOB configuration */ 458 /* OOB Demodulator parameters struct, used in OOB params configuration */ 465 /* OOB Demodulator error counters */ 472 /* OOB status */
|
| /kernel/linux/linux-5.10/drivers/mtd/tests/ |
| D | readtest.c | 63 pr_err("error: read oob failed at " in read_eraseblock_by_page() 83 int pg, oob; in dump_eraseblock() local 98 pr_info("dumping oob from eraseblock %d\n", ebnum); in dump_eraseblock() 101 for (oob = 0; oob < n;) { in dump_eraseblock() 105 for (j = 0; j < 32 && oob < n; j++, oob++, i++) in dump_eraseblock() 149 "eraseblock %u, OOB size %u\n", in mtd_readtest_init()
|
| /kernel/linux/linux-6.6/drivers/mtd/tests/ |
| D | readtest.c | 63 pr_err("error: read oob failed at " in read_eraseblock_by_page() 83 int pg, oob; in dump_eraseblock() local 98 pr_info("dumping oob from eraseblock %d\n", ebnum); in dump_eraseblock() 101 for (oob = 0; oob < n;) { in dump_eraseblock() 105 for (j = 0; j < 32 && oob < n; j++, oob++, i++) in dump_eraseblock() 149 "eraseblock %u, OOB size %u\n", in mtd_readtest_init()
|
| /kernel/linux/linux-6.6/drivers/mtd/devices/ |
| D | docg3.c | 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. 889 doc_dbg("doc_read_oob(from=%lld, mode=%d, data=(%p:%zu), oob=(%p:%zu))\n", in doc_read_oob() 930 doc_dbg("OOB - INFO: %*phC\n", 7, oobbuf); in doc_read_oob() 931 doc_dbg("OOB - HAMMING: %02x\n", oobbuf[7]); in doc_read_oob() 932 doc_dbg("OOB - BCH_ECC: %*phC\n", 7, oobbuf + 8); in doc_read_oob() [all …]
|
| /kernel/linux/linux-5.10/drivers/mtd/devices/ |
| D | docg3.c | 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() [all …]
|
| /kernel/linux/linux-6.6/drivers/mtd/nand/raw/brcmnand/ |
| D | brcmnand.c | 251 u8 *oob; member 259 u8 *oob, u32 len, u8 dma_cmd); 1355 "error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n", in brcmstb_choose_ecc_layout() 1407 /* Helper functions for reading and writing OOB registers */ 1446 * read_oob_from_regs - read data from OOB registers 1449 * @oob: buffer to read to 1450 * @sas: spare area sector size (i.e., OOB size per FLASH_CACHE) 1453 static int read_oob_from_regs(struct brcmnand_controller *ctrl, int i, u8 *oob, in read_oob_from_regs() argument 1459 /* Adjust OOB values for 1K sector size */ in read_oob_from_regs() 1465 oob[j] = oob_reg_read(ctrl, j); in read_oob_from_regs() [all …]
|