mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
mmc: dwmmc: return a proper error code when busy
When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
b2acee4bb0
commit
66d0b7e1f2
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
|
||||||
flags = dwmci_set_transfer_mode(host, data);
|
flags = dwmci_set_transfer_mode(host, data);
|
||||||
|
|
||||||
if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
|
if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
|
||||||
return -1;
|
return -EBUSY;
|
||||||
|
|
||||||
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
|
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
|
||||||
flags |= DWMCI_CMD_ABORT_STOP;
|
flags |= DWMCI_CMD_ABORT_STOP;
|
||||||
|
|
Loading…
Reference in a new issue