Home
last modified time | relevance | path

Searched full:oob (Results 1 – 25 of 219) sorted by relevance

123456789

/linux/tools/testing/selftests/net/af_unix/
H A Dtest_unix_oob.c
H A Dmsg_oob.c349 TEST_F(msg_oob, oob) in TEST_F() argument
366 recvpair("", -EAGAIN, 1, 0); /* Drop OOB. */ in TEST_F()
396 recvpair("hell", 4, 5, 0); /* Break at OOB even with enough buffer. */ in TEST_F()
422 recvpair("hell", 4, 9, 0); /* Break at OOB even after it's recv()ed. */ in TEST_F()
441 recvpair("hell", 4, 10, 0); /* Break at OOB even with enough buffer. */ in TEST_F()
445 recvpair("world", 5, 10, 0); /* Drop OOB and recv() the next skb. */ in TEST_F()
468 recvpair("hellowo", 7, 10, 0); /* Break at OOB but not at ex-OOB. */ in TEST_F()
595 recvpair("hell", 4, 4, 0); /* Intentionally stop at ex-OOB. */ in TEST_F()
629 recvpair("hell", 4, 5, 0); /* Break at OOB but not at ex-OOB. */ in TEST_F()
654 recvpair("hell", 4, 9, 0); /* Break at OOB even with enough buffer. */ in TEST_F()
[all …]
/linux/drivers/mtd/parsers/
H A Dsharpslpart.c35 /* 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 …]
/linux/drivers/mtd/
H A Dsm_ftl.c127 /* ----------------------- 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 …]
H A Dnftlcore.c121 * 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 …]
H A Dinftlcore.c134 * 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 …]
/linux/drivers/mtd/nand/raw/
H A Dsm_common.h9 /* 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()
H A Dnand_base.c382 * nand_fill_oob - [INTERN] Transfer client buffer to oob
384 * @oob: oob data buffer
385 * @len: oob data write length
386 * @ops: oob ops structure
388 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, size_t len, in nand_fill_oob() argument
395 * Initialise to all 0xFF, to avoid the possibility of left over OOB in nand_fill_oob()
396 * data from a previous OOB read. in nand_fill_oob()
404 memcpy(chip->oob_poi + ops->ooboffs, oob, len); in nand_fill_oob()
405 return oob + len; in nand_fill_oob()
408 ret = mtd_ooblayout_set_databytes(mtd, oob, chip->oob_poi, in nand_fill_oob()
[all …]
H A Dsunxi_nand.c544 * 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 …]
H A Dfsl_elbc_nand.c61 unsigned int oob; /* Non zero if operating on OOB data */ member
118 * ELBC may use HW ECC, so that OOB offsets, that NAND core uses for bbt,
120 * OOB {11, 5}, works for both SP and LP chips, with ECCM = 1 and ECCM = 0.
151 static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) in set_addr() argument
170 (oob ? FPAR_LP_MS : 0) | column); in set_addr()
180 (oob ? FPAR_SP_MS : 0) | column); in set_addr()
187 /* for OOB data point to the second half of the buffer */ in set_addr()
188 if (oob) in set_addr()
275 static void fsl_elbc_do_read(struct nand_chip *chip, int oob) in fsl_elbc_do_read() argument
298 if (oob) in fsl_elbc_do_read()
[all …]
H A Drockchip-nand-controller.c27 * 1024 * n data + m Bytes oob
29 * First byte of oob(spare).
82 #define NFC_SYS_DATA_SIZE (4) /* 4 bytes sys data in oob pre 1024 data.*/
536 * The first four bytes of OOB are reserved for the in rk_nfc_write_page_raw()
539 * in OOB also need to be written back. in rk_nfc_write_page_raw()
548 * The OOB data layout on the NFC is: in rk_nfc_write_page_raw()
601 u8 *oob; in rk_nfc_write_page_hwecc() local
612 * by the boot ROM and the first 32 bits of OOB need to link to in rk_nfc_write_page_hwecc()
614 * OOB data from the MTD framework, because this page address in rk_nfc_write_page_hwecc()
616 * so we shift all OOB data including the BBM with 4 byte positions. in rk_nfc_write_page_hwecc()
[all …]
/linux/include/uapi/mtd/
H A Dmtd-abi.h52 * @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 …]
/linux/include/linux/mtd/
H A Dbbm.h24 * @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
H A Dmtd.h50 * struct mtd_oob_ops - oob operation operands
57 * @ooblen: number of oob bytes to write/read
58 * @oobretlen: number of oob bytes written/read
59 * @ooboffs: offset of oob data in the oob area (only relevant when
61 * @datbuf: data buffer - if NULL only oob data are read/written
62 * @oobbuf: oob data buffer
64 * Note, some MTD drivers do not allow you to write more than one OOB area at
83 * struct mtd_oob_region - oob region definition
87 * This structure describes a region of the OOB area, and is used
89 * Each section is defined by an offset within the OOB area and a
[all …]
H A Dnand.h21 * @oobsize: OOB area size
102 * @ooboffs: the OOB offset within the page
103 * @ooblen: the number of OOB bytes to read from/write to this page
104 * @oobbuf: buffer to store OOB data in or get OOB data from
156 * @NAND_ECC_PLACEMENT_OOB: The ECC bytes are located in the OOB area
184 * @placement: OOB placement (if relevant)
239 * generic OOB layouts
356 * @oob_buffer_size: Real size of the OOB buffer to use (can be set by the
359 * @spare_oobbuf: OOB bounce buffer
361 * @bounce_oob: Flag indicating an OOB bounce buffer is used
[all …]
/linux/drivers/media/dvb-frontends/
H A Dmxl692_defs.h88 /* 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 */
/linux/drivers/mtd/tests/
H A Dreadtest.c63 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()
H A Doobtest.c5 * Test OOB read and write on MTD device.
281 /* read entire block's OOB at one go */ in verify_eraseblock_in_one_go()
293 /* verify one page OOB at a time for bitflip per page limit check */ in verify_eraseblock_in_one_go()
374 "eraseblock %u, OOB size %u\n", in mtd_oobtest_init()
398 /* First test: write all OOB, read it back and verify */ in mtd_oobtest_init()
416 * Second test: write all OOB, a block at a time, read it back and in mtd_oobtest_init()
449 * Third test: write OOB at varying offsets and lengths, read it back in mtd_oobtest_init()
495 /* Attempt to write off end of OOB */ in mtd_oobtest_init()
504 pr_info("attempting to start write past end of OOB\n"); in mtd_oobtest_init()
510 pr_err("error: can write past end of OOB\n"); in mtd_oobtest_init()
[all …]
/linux/drivers/mtd/devices/
H A Ddocg3.c40 * - 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 …]
/linux/drivers/mtd/nand/raw/brcmnand/
H A Dbrcmnand.c251 u8 *oob; member
259 u8 *oob, u32 len, u8 dma_cmd);
1418 "error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n", in brcmstb_choose_ecc_layout()
1471 /* Helper functions for reading and writing OOB registers */
1510 * read_oob_from_regs - read data from OOB registers
1513 * @oob: buffer to read to
1514 * @sas: spare area sector size (i.e., OOB size per FLASH_CACHE)
1517 static int read_oob_from_regs(struct brcmnand_controller *ctrl, int i, u8 *oob, in read_oob_from_regs() argument
1523 /* Adjust OOB values for 1K sector size */ in read_oob_from_regs()
1529 oob[j] = oob_reg_read(ctrl, j); in read_oob_from_regs()
[all …]
/linux/drivers/usb/serial/
H A Ddigi_acceleport.c59 * "OOB": can be used on the out-of-band endpoint
61 #define DIGI_CMD_SET_BAUD_RATE 0 /* INB, OOB */
62 #define DIGI_CMD_SET_WORD_SIZE 1 /* INB, OOB */
63 #define DIGI_CMD_SET_PARITY 2 /* INB, OOB */
64 #define DIGI_CMD_SET_STOP_BITS 3 /* INB, OOB */
65 #define DIGI_CMD_SET_INPUT_FLOW_CONTROL 4 /* INB, OOB */
66 #define DIGI_CMD_SET_OUTPUT_FLOW_CONTROL 5 /* INB, OOB */
67 #define DIGI_CMD_SET_DTR_SIGNAL 6 /* INB, OOB */
68 #define DIGI_CMD_SET_RTS_SIGNAL 7 /* INB, OOB */
69 #define DIGI_CMD_READ_INPUT_SIGNALS 8 /* OOB */
[all …]
/linux/Documentation/devicetree/bindings/mtd/
H A Ddavinci-nand.txt52 - nand-on-flash-bbt: use flash based bad block table support. OOB
53 identifier is saved in OOB area. If not present
66 - ti,davinci-nand-use-bbt: use flash based bad block table support. OOB
67 identifier is saved in OOB area. If not present
H A Draw-nand-chip.yaml37 but can be explicitly set to "oob", if all ECC bytes are
38 known to be stored in the OOB area, or "interleaved" if ECC
41 enum: [ oob, interleaved ]
75 providing the best strength and taking the OOB area size
/linux/Documentation/devicetree/bindings/ata/
H A Dnvidia,tegra-ahci.yaml34 - const: sata-oob
44 - const: sata-oob
170 clock-names = "sata", "sata-oob";
174 reset-names = "sata", "sata-cold", "sata-oob";
/linux/drivers/mtd/nand/spi/
H A Desmt.c5 * Martin Kurbanov <mmkurbanov@sberdevices.ru> - OOB layout
30 * OOB spare area map (64 bytes)
36 * | | OOB free data Area |non ECC protected |
51 * OOB ECC protected Area - not used due to
94 /* Use only 2 non-protected ECC bytes per each OOB section */ in f50l1g41lb_ooblayout_free()

123456789