File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -639,6 +639,20 @@ static int qcom_spi_check_error(struct qcom_nand_controller *snandc)
639
639
unsigned int stat ;
640
640
641
641
stat = buffer & BS_CORRECTABLE_ERR_MSK ;
642
+
643
+ /*
644
+ * The exact number of the corrected bits is
645
+ * unknown because the hardware only reports the
646
+ * number of the corrected bytes.
647
+ *
648
+ * Since we have no better solution at the moment,
649
+ * report that value as the number of bit errors
650
+ * despite that it is inaccurate in most cases.
651
+ */
652
+ if (stat && stat != ecc_cfg -> strength )
653
+ dev_warn_once (snandc -> dev ,
654
+ "Warning: due to hw limitation, the reported number of the corrected bits may be inaccurate\n" );
655
+
642
656
snandc -> qspi -> ecc_stats .corrected += stat ;
643
657
max_bitflips = max (max_bitflips , stat );
644
658
}
You can’t perform that action at this time.
0 commit comments