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.
--- 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
Hi John,
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]>
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 ;
Hi John,
Quoted 5 lines · Jaehoon Chung
Hi John,
Quoted 2 lines · John Keeping
When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1.
Is this patch same?
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 27 lines
Quoted 2 lines
Signed-off-by John Keeping <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>>Best Regards,
Jaehoon ChungQuoted 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 ;
Quoted 8 lines · Jaehoon Chung
Quoted 3 lines · Jaehoon Chung
Quoted 2 lines · John Keeping
When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1.
Is this patch same?
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Yes, sorry - I still had the patch file lying around and passed the wrong filename to git send-email!
Quoted 28 lines
Quoted 27 lines
Quoted 2 lines
Signed-off-by John Keeping <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>>Best Regards,
Jaehoon ChungQuoted 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 ;
Quoted 6 lines · John Keeping
Quoted 5 lines · Jaehoon Chung
Quoted 3 lines · Jaehoon Chung
Quoted 2 lines · John Keeping
When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1.
Quoted 6 lines
Quoted 3 lines
Is this patch same?
Yes, sorry - I still had the patch file lying around and passed the wrong filename to git send-email!
Applied with your previous patch.
Thanks!
Best Regards,
Jaehoon Chung
Quoted 30 lines
Quoted 29 lines
Quoted 28 lines
Quoted 3 lines
Signed-off-by John Keeping <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>>Best Regards,
Jaehoon ChungQuoted 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 ;