* [U-Boot] ext4write issue.
@ 2015-05-25 7:01 S Durga Prasad Paladugu
2015-05-25 9:36 ` Przemyslaw Marczak
0 siblings, 1 reply; 2+ messages in thread
From: S Durga Prasad Paladugu @ 2015-05-25 7:01 UTC (permalink / raw)
To: u-boot
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.
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;
--
Does any one faced same kind of issue? Can any one of you have an idea on
what could be the issue in this case or any further inputs on this will be
helpful.
Regards,
DP
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] ext4write issue.
2015-05-25 7:01 [U-Boot] ext4write issue S Durga Prasad Paladugu
@ 2015-05-25 9:36 ` Przemyslaw Marczak
0 siblings, 0 replies; 2+ messages in thread
From: Przemyslaw Marczak @ 2015-05-25 9:36 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-25 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 7:01 [U-Boot] ext4write issue S Durga Prasad Paladugu
2015-05-25 9:36 ` Przemyslaw Marczak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox