Savin Zlobec
unread,Oct 24, 2013, 3:39:02 PM10/24/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to UFFS
Hi Ricky,
I have a case where I would like to recover as much data as possible
if I get ECC failure from my HW. The problem is that if the flash
driver returns ECC_FAIL or BAD_BLK in uffs_FlashReadPageTag the SW
calculated Tag ECC is not checked and no verification/correction is
attempted. So even if the ECC failure is located somewhere in data
UFFS automatically treats its tag as invalid - uffs_FlashReadPageTag
returns ECC_FAIL or BAD_BLK and uffs_BlockInfoLoad sets the Tag invalid
bit.
Block recovery will stop at the failed page, because FindPageInBlock
methods check the Tag valid bit and return UFFS_INVALID_PAGE if set.
Please find attached a patch which tries to remedy that. Although it
will work correctly only if CONFIG_UFFS_REFRESH_BLOCK is enabled, since
the patch modifies uffs_FlashReadPageTag to override HW ECC_FAIL/BAD_BLK
- if Tag was OK or corrected - with ECC_OK. This will trigger block
refresh and subsequently block recover. uffs_FlashReadPageTag could
use more verbose error codes or a flag to indicate to upper layer
that Tag was OK, but block is bad and needs to be recovered.
Regards.