From f3e190a2472fe16a4361c5d53b55b571c078dd71 Mon Sep 17 00:00:00 2001 From: Lukasz Kosinski Date: Tue, 27 Dec 2022 14:52:04 +0100 Subject: [PATCH] imx6ull-flash: add temporary fix for reading broken metadata JIRA: DTR-371 --- storage/imx6ull-flash/flashdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/storage/imx6ull-flash/flashdev.c b/storage/imx6ull-flash/flashdev.c index 9b27895f6..05beb94d2 100644 --- a/storage/imx6ull-flash/flashdev.c +++ b/storage/imx6ull-flash/flashdev.c @@ -397,7 +397,12 @@ static int flashmtd_metaRead(struct _storage_t *strg, off_t offs, void *data, si err = _flashmtd_checkECC(strg, paddr, 1); if (err == -EBADMSG) { /* Continue reading, let the client handle -EBADMSG */ - ret = -EBADMSG; + /* ret = -EBADMSG; */ + + /* TODO: temporary fix for broken metadata */ + /* To be removed once proper fix is in place */ + memset(meta->metadata, 0xff, strg->dev->mtd->oobSize); + ret = -EUCLEAN; } else if (err == -EUCLEAN && ret != -EBADMSG) { /* Not a critical error, continue reading, return -EUCLEAN, but don't overwrite -EBADMSG */