printf("mmc fail to send stop cmd\n");
return 0;
}
-
- /* Waiting for the ready status */
- mmc_send_status(mmc, timeout);
}
+ /* Waiting for the ready status */
+ if (mmc_send_status(mmc, timeout))
+ return 0;
+
return blkcnt;
}
{
struct mmc_cmd cmd;
struct mmc_data data;
- int timeout = 1000;
if (blkcnt > 1)
cmd.cmdidx = MMC_CMD_READ_MULTIPLE_BLOCK;
printf("mmc fail to send stop cmd\n");
return 0;
}
-
- /* Waiting for the ready status */
- mmc_send_status(mmc, timeout);
}
return blkcnt;
ret = mmc_send_cmd(mmc, &cmd, NULL);
/* Waiting for the ready status */
- mmc_send_status(mmc, timeout);
+ if (!ret)
+ ret = mmc_send_status(mmc, timeout);
return ret;