Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imx6ull-flash: add temporary fix for reading broken metadata #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion storage/imx6ull-flash/flashdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down