mmc: dwmmc: return a proper error code when busy
PATCH 1/1 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 <[email protected]>
--- drivers/mmc/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/dw_mmc.c +1 -1
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 4 lines · John Keeping
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 <[email protected]>
Reviewed-by Jaehoon Chung <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 18 lines
--- drivers/mmc/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/dw_mmc.c +1
-1@@ -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 ;