aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2021-12-07 16:09:35 +0000
committerJaehoon Chung <jh80.chung@samsung.com>2022-01-12 09:56:40 +0900
commit66d0b7e1f2bdcfbb7a64a0ffc1fd63617b8dd995 (patch)
tree38a395780bfc8c205ca859b5d269fb1f4ac057f6
parentb2acee4bb02672b5bf2b0f4a6f77b0e5ddc9d6b5 (diff)
downloadu-boot-66d0b7e1f2bdcfbb7a64a0ffc1fd63617b8dd995.zip
u-boot-66d0b7e1f2bdcfbb7a64a0ffc1fd63617b8dd995.tar.gz
u-boot-66d0b7e1f2bdcfbb7a64a0ffc1fd63617b8dd995.tar.bz2
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>
-rw-r--r--drivers/mmc/dw_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index a949dad..4232c5e 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -301,7 +301,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
flags = dwmci_set_transfer_mode(host, data);
if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
- return -1;
+ return -EBUSY;
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
flags |= DWMCI_CMD_ABORT_STOP;