From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ext4write issue.
Date: Mon, 25 May 2015 11:36:40 +0200 [thread overview]
Message-ID: <5562ED28.7070602@samsung.com> (raw)
In-Reply-To: <CAAhU36jyF6BPvyL+Yv+Q-whWu4No=tp=viKojqb0qx2eefAP7A@mail.gmail.com>
Hello Durga,
On 05/25/2015 09:01 AM, S Durga Prasad Paladugu wrote:
> Hi all,
>
> I am having an ext4write issue on zynq, which fails when i am trying to
> write a file to ext4 formatted SD card. here is the log below.
>
> zynq-uboot> ext4ls mmc 0:2
> <DIR> 1024 .
> <DIR> 1024 ..
> <DIR> 1024 lost+found
> zynq-uboot>
> zynq-uboot>
> zynq-uboot> ext4write mmc 0:2 0x40000000 /bar.txt 10
> File System is consistent
> sdhci_send_command: MMC: 0 busy timeout increasing to: 200 ms.
> sdhci_send_command: MMC: 0 busy timeout increasing to: 400 ms.
> sdhci_send_command: MMC: 0 busy timeout increasing to: 800 ms.
> sdhci_send_command: MMC: 0 busy timeout increasing to: 1600 ms.
> sdhci_send_command: MMC: 0 busy timeout increasing to: 3200 ms.
It seem that your card is slowly.
You can test it by:
- increasing this timeout by adding: "#define
CONFIG_SDHCI_CMD_MAX_TIMEOUT 10000 " (10 sec) to your board config.
- you can try erase your card by command: mmc erase ...,
and then create new partition table and filesystems.
- try another sd card ?
Usually, when card is busy, it means that the last command didn't
finished and/or the card is doing some background operations. I have
seen this for in few eMMC cards, but for eMMC we can enable bkops
manually and wait until card finishes.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> ** ext4fs_devread read error - block
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> ** ext4fs_devread read error - block
> Error in getting the block group descriptor table
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> ** ext2fs_devread() read error **
> sdhci_send_command: MMC: 0 busy timeout.
> ** ext4fs_devread read error - block
> sdhci_send_command: MMC: 0 busy timeout.
> sdhci_send_command: MMC: 0 busy timeout.
> ** ext4fs_devread read error - block
> sdhci_send_command: MMC: 0 busy timeout.
> error in File System init
> ** Error ext4fs_write() **
> zynq-uboot>
> sdhci_send_command: MMC: 0 busy timeout.
> ** Can't read partition table on 0:0 **
> ** Invalid partition 2 **
> zynq-uboot> ext4ls mmc 0:2
> sdhci_send_command: MMC: 0 busy timeout.
> ** Can't read partition table on 0:0 **
> ** Invalid partition 2 **
> zynq-uboot>
>
> I further debugged and found that the same is working with single block
> write commands instead of multi block write commands. Here is the diff of
> the changes i made to make it single block write.
>
> drivers/mmc/mmc_write.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
> index aa2fdef..269d233 100644
> --- a/drivers/mmc/mmc_write.c
> +++ b/drivers/mmc/mmc_write.c
> @@ -167,7 +167,7 @@ ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t
> blkcnt, const void *src)
> return 0;
>
> do {
> - cur = (blocks_todo > mmc->b_max) ? mmc->b_max : blocks_todo;
> + cur = 1;
> if (mmc_write_blocks(mmc, start, cur, src) != cur)
> return 0;
> blocks_todo -= cur;
>
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
prev parent reply other threads:[~2015-05-25 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-25 7:01 [U-Boot] ext4write issue S Durga Prasad Paladugu
2015-05-25 9:36 ` Przemyslaw Marczak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5562ED28.7070602@samsung.com \
--to=p.marczak@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox