diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-05-03 02:04:39 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-04 04:30:42 -0400 |
commit | eb89580e1a8388d206bf143c6c39d001095106ba (patch) | |
tree | a0cee0ac8e62a9731ade3d8aa400b621252ea3f4 /drivers/mtd/ubi/ubi.h | |
parent | 786d78318586cbdc8aec539fe5a4942490267fef (diff) |
UBI: introduce a new IO return code
This patch introduces the %UBI_IO_BAD_HDR_READ return code for
the I/O level function. We will use this code in order to distinguish
between "corrupted header possibly because this is non-ubi data" and
"corrupted header possibly because of real data corruption and ECC error".
So far this patch does not introduce any functional change, just a
preparation.
This patch is pased on a patch from
Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 539b3f6c7a5..0359e0cce48 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -90,12 +90,15 @@ | |||
90 | * UBI_IO_PEB_FREE: the physical eraseblock is free, i.e. it contains only a | 90 | * UBI_IO_PEB_FREE: the physical eraseblock is free, i.e. it contains only a |
91 | * valid erase counter header, and the rest are %0xFF bytes | 91 | * valid erase counter header, and the rest are %0xFF bytes |
92 | * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) | 92 | * UBI_IO_BAD_HDR: the EC or VID header is corrupted (bad magic or CRC) |
93 | * UBI_IO_BAD_HDR_READ: the same as %UBI_IO_BAD_HDR, but also there was a read | ||
94 | * error reported by the flash driver | ||
93 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected | 95 | * UBI_IO_BITFLIPS: bit-flips were detected and corrected |
94 | */ | 96 | */ |
95 | enum { | 97 | enum { |
96 | UBI_IO_PEB_EMPTY = 1, | 98 | UBI_IO_PEB_EMPTY = 1, |
97 | UBI_IO_PEB_FREE, | 99 | UBI_IO_PEB_FREE, |
98 | UBI_IO_BAD_HDR, | 100 | UBI_IO_BAD_HDR, |
101 | UBI_IO_BAD_HDR_READ, | ||
99 | UBI_IO_BITFLIPS | 102 | UBI_IO_BITFLIPS |
100 | }; | 103 | }; |
101 | 104 | ||