---
name: "nand_read_page_hwecc_oob_first"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/nand_read_page_hwecc_oob_first"
---

# nand\_read\_page\_hwecc\_oob\_first(9)

\[REPLACEABLE\] hw ecc, read oob first

## NAME

nand\_read\_page\_hwecc\_oob\_first - \[REPLACEABLE\] hw ecc, read oob first

## SYNOPSIS

**int nand\_read\_page\_hwecc\_oob\_first(struct mtd\_info \*** *mtd***, struct nand\_chip \*** *chip***, uint8\_t \*** *buf***, int** *oob\_required***, int** *page***);**

## ARGUMENTS

*mtd*

mtd info structure

*chip*

nand chip info structure

*buf*

buffer to store read data

*oob\_required*

caller requires OOB data read to chip-\>oob\_poi

*page*

page number to read

## DESCRIPTION

Hardware ECC for large page chips, require OOB to be read first. For this ECC mode, the write\_page method is re-used from ECC\_HW. These methods read/write ECC from the OOB area, unlike the ECC\_HW\_SYNDROME support with multiple ECC steps, follows the “infix ECC” scheme and reads/writes ECC from the data area, by overwriting the NAND manufacturer bad block markings.

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
