[PATCH] mmc: dwmmc: return a proper error code when busy

John Keeping john at metanate.com
Wed Jan 12 12:11:51 CET 2022


On Wed, Jan 12, 2022 at 08:38:01AM +0900, Jaehoon Chung wrote:
> On 1/12/22 7:12 AM, Jaehoon Chung wrote:
> > On 1/12/22 1:15 AM, John Keeping wrote:
> >> 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/20211207160935.404395-1-john@metanate.com/

Yes, sorry - I still had the patch file lying around and passed the
wrong filename to git send-email!

> >>
> >> Signed-off-by: John Keeping <john at metanate.com>
> > 
> > Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>> 
> > Best Regards,
> > Jaehoon Chung
> > 
> >> ---
> >>  drivers/mmc/dw_mmc.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> >> index a949dad574..4232c5eb8c 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;
> >>
> > 
> > 
> 


More information about the U-Boot mailing list