This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i/o read/write errors with SD

Hi All,

       I have booted Pandaboard in the fastboot mode, by creating GPT partition table on SD. I am able to boot and use android. But soon android is hanging (It is happening when I tried to do read/write operations like creating a new folder or when device wakes from sleep), I checked the kernel log from dmesg, It gave me the following errors showing read/writes to SD are failing.

I have used 16GB SD card.

What can we infer from the card status 0x400e00, and its changing to 0x00. I am looking into SD physical layer specifications for checking this error card status. Please help me in this issue.

$ dmesg

mmcblk0: retrying using single block read
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400e00
mmcblk0: error -110 transferring data, sector 401192, nr 8, card status 0x400e00
end_request: I/O error, dev mmcblk0, sector 401192
end_request: I/O error, dev mmcblk0, sector 401193
mmcblk0: retrying using single block read
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400e00
mmcblk0: error -110 transferring data, sector 401192, nr 8, card status 0x400e00
end_request: I/O error, dev mmcblk0, sector 401192
end_request: I/O error, dev mmcblk0, sector 401193
mmcblk0: retrying using single block read
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400e00
mmcblk0: error -110 transferring data, sector 2131976, nr 8, card status 0x400e00
end_request: I/O error, dev mmcblk0, sector 2131976
end_request: I/O error, dev mmcblk0, sector 2131977
EXT4-fs error (device mmcblk0p7): ext4_read_inode_bitmap: Cannot read inode bitmap - block_group = 2, inode_bitmap = 65537
Aborting journal on device mmcblk0p7-8.
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x400e00
mmcblk0: error -110 transferring data, sector 1612056, nr 8, card status 0x0

Thanks,
Vamshi G.
  • Hi,

    Which Android release are you using for this test? Can you try with another SD Card with lesser capacity (8GB or less) and see if this problem goes away?

    Satheesh.

  • Hi Satheesh, Thanks for your response

            I am using PandaBoard L27.12.1-P2 release. I even suspected that issue can be 16GB SD, but how should I prove its failing due to 16GB memory card. with 4GB SD cards It is working fine. I want to know the root cause for this behavior. Generally most of android devices provides booting from eMMC and with an internal memory of 16 or 32 GB. How its possible with those devices. Please help me in this regard considering issue with 16GB SD or 16GB eMMC

    Thanks.

  • Hi Vamshi,

    Could you please try the following patch? Some of the SD Card require bigger timeout for access. You need to manually merge these changes in your kernel.

    diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 690255c..0f2caca 100644
    --- a/drivers/mmc/core/core.c
    +++ b/drivers/mmc/core/core.c
    @@ -280,7 +280,11 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
             if (data->flags & MMC_DATA_WRITE)

    -            limit_us = 300000;
    +            limit_us = 3000000;
             else
    -             limit_us = 100000;
    +             limit_us = 1000000;

    If this does not work, you can try increasing the boot partition size from 64M to 512M and see if this fixes the issue.

    Also, in future please post pandaboard related questions to pandaboard@googlegroups.com Strictly speaking this forum is not for pandaboard discussions.

    Regards, Satheesh

  • Hi Sathessh,

            Sorry, In future I will post issues at pandaboard@googlegroups.com

    I have tried applying the above specified patch, It did not help me still I have the same Issue.  I booted from SD and entered into fastboot and formated eMMC it is of 16GB size and the partition table I created using fastboot is as follows. (I have made necessary changes in u-boot for partitioning eMMC)

    new partition table:

    256  128K xloader

    512 256K bootloader

    2048 8M recovery

    18432 8M boot

    34816 512M system

    1083392 256M cache

    1607680 512M userdata

    2656256 13615M media

    Am I missing any thing while partition eMMC or in filesystem creation. 

    the error gave this card status 0x400e00

    card status is 32 bit field, With above status I could infer that it is CRC error and card was in programming mode.

    Should I change the boot partition from 8M => 64M

    Thanks. 

  • Hi Vamsi,

    To isolate the problem, is it possible for you to change the media partition size to match a 8GB card? Right now I see that the partition size for media is set to about 13GB. Please try to reduce it to 5GB or less and see if the problem comes up. If it does come up, then it would mean that the problem could be with SD Card driver or below. If not, there should be some fix required in the Filesystem drivers to support 16GB+ cards.

    You can try increasing the boot partition size from 8M to 64M as well and share the results.

    Regards,Satheesh

  • Hi Satheesh,

           I am trying to verify the clock provided to eMMC, as per TRM maximum clock is 48MHZ for eMMC, but omap-hsmmc.c is trying to configure 52MHz. I am trying to cross check this. I will try your suggestions changing the partition size once I am sure about clock.

    Thanks.

  • Hi Sateesh,

            I have a doubt regarding partition sizes. Does the partition size of and img should match the partition size of the disk space on eMMC. 

    for example, actual size of system.img is 184MB, and during its creation partition size is specified as 512M which is same as that of 512M partition on eMMC.

    Where to set the partition size for recovery image ?

    Thanks.

  • Hi Vamshi,

    I am not clear on your question. I am unable to understand why you want to change the system and recovery partition of the eMMC. My understanding was that you have a problem in using a 16GB SD Card. My suggestion was to format the 16GB card as an 8GB card or less to see if the problem goes away. This might give some clue to debug the original problem you were facing.

    Satheesh

  • Hi Vamsi, 

    Did you solved this SD card problem? I am getting same error and not able to find whats going on there?

    Please share your solution if you solved this. 

    Thanks

    Yogesh