eMMC I/O error

Hi All,
We made a customize TK1 board, and it used two different eMMC. One is same as TK1 dev board used(Sandisk SDINBDE4), the other one is Sandisk SDINBDG4. When I run this command “sudo fstrim /”, the one which uses Sandisk SDIN8DG4 eMMC will show errors below. But there is no errors in the board with Sandisk SDINBDE4. I would like to know if there is any parameter need to be fine tune when we use eMMC different with TK1 dev board ?

ubuntu@tegra-ubuntu:~$ sudo fstrim /
[sudo] password for ubuntu:
[  480.966165] end_request: I/O error, dev mmcblk0, sector 190376
[  480.974166] end_request: I/O error, dev mmcblk0, sector 1858968
[  480.980376] end_request: I/O error, dev mmcblk0, sector 1937432
[  480.986542] end_request: I/O error, dev mmcblk0, sector 2074128
[  480.992839] end_request: I/O error, dev mmcblk0, sector 2334248
[  480.999057] end_request: I/O error, dev mmcblk0, sector 2367832
[  481.005068] end_request: I/O error, dev mmcblk0, sector 2410592
[  481.011269] end_request: I/O error, dev mmcblk0, sector 2467904
[  481.017309] end_request: I/O error, dev mmcblk0, sector 2550176
[  481.023433] end_request: I/O error, dev mmcblk0, sector 2722672
ubuntu@tegra-ubuntu:~$

Not sure if this helps, please check.

Hi WayneWWW,
I did the changes as below and this issue has been fixed.
I find the root cause is that sec_feature_support is zero when the ext_csd version is higher than 6.
I check this function “mmc_read_ext_csd” on linx kernel git server and don’t see the same codes.
So I would like to know if there has any special reason for Nvidia doing this changes!?

diff --git a/kernel/drivers/mmc/core/mmc.c b/kernel/drivers/mmc/core/mmc.c
index 3e1cabd21..5e6005530 100644
--- a/kernel/drivers/mmc/core/mmc.c
+++ b/kernel/drivers/mmc/core/mmc.c
@@ -447,6 +447,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
                        }
                }
 
+#if 0
                if (card->ext_csd.rev < 6) {
                        card->ext_csd.sec_trim_mult =
                                ext_csd[EXT_CSD_SEC_TRIM_MULT];
@@ -464,6 +465,15 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
 
                card->ext_csd.trim_timeout = 300 *
                        ext_csd[EXT_CSD_TRIM_MULT];
+#endif
+               card->ext_csd.sec_trim_mult =
+                       ext_csd[EXT_CSD_SEC_TRIM_MULT];
+               card->ext_csd.sec_erase_mult =
+                       ext_csd[EXT_CSD_SEC_ERASE_MULT];
+               card->ext_csd.sec_feature_support =
+                       ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
+               card->ext_csd.trim_timeout = 300 *
+                       ext_csd[EXT_CSD_TRIM_MULT];

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.