summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/vg468.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-18 17:09:41 (GMT)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-26 17:15:13 (GMT)
commit2362a53ec59f286495307e0e0d8ef2401e8c5c49 (patch)
treea7913ce0ed7c28c7f4543c875ded5716147a4b6d /drivers/pcmcia/vg468.h
parent235d6200ea63372935e097cb82e6a8c133d51cad (diff)
downloadlinux-fsl-qoriq-2362a53ec59f286495307e0e0d8ef2401e8c5c49.tar.xz
UBI: fix error code in ubi_io_read()
When NAND detects an ECC error, it returns -EBADMSG. It does not stop reading requested data if one page has an ECC error, it keeps going and reads all the requested data. If it fails to read all the data, it does not return -EBADMSG, but returns the error code which reflects the reason of the failure. But some drivers may have bugs (e.g., OneNAND had) and stop reading after the first ECC error, so it returns -EBADMSG. In turn, UBI propagates this up to the caller. The caller will treat this as "all the requested data was read, but there was an ECC error". So we change the error code to -EIO if it is -EBADMSG and the read length is less then the requested length. We also add an assertion, so if UBI debugging is enabled, UBI will bug. Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/pcmcia/vg468.h')
0 files changed, 0 insertions, 0 deletions