* [PATCH] mmc: dwmmc: return a proper error code when busy
@ 2022-01-11 16:15 ` John Keeping
2022-01-11 22:12 ` Jaehoon Chung
0 siblings, 1 reply; 7+ messages in thread
From: John Keeping @ 2022-01-11 16:15 UTC (permalink / raw)
To: u-boot; +Cc: John Keeping, Peng Fan, Jaehoon Chung
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>
---
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: dwmmc: return a proper error code when busy
2022-01-11 16:15 ` [PATCH] mmc: dwmmc: return a proper error code when busy John Keeping
@ 2022-01-11 22:12 ` Jaehoon Chung
2022-01-11 23:38 ` Jaehoon Chung
0 siblings, 1 reply; 7+ messages in thread
From: Jaehoon Chung @ 2022-01-11 22:12 UTC (permalink / raw)
To: John Keeping, u-boot; +Cc: Peng Fan
Hi John,
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.
>
> Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Jaehoon Chung <jh80.chung@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;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: dwmmc: return a proper error code when busy
2022-01-11 22:12 ` Jaehoon Chung
@ 2022-01-11 23:38 ` Jaehoon Chung
2022-01-12 11:11 ` John Keeping
0 siblings, 1 reply; 7+ messages in thread
From: Jaehoon Chung @ 2022-01-11 23:38 UTC (permalink / raw)
To: John Keeping, u-boot; +Cc: Peng Fan
Hi John,
On 1/12/22 7:12 AM, Jaehoon Chung wrote:
> Hi John,
>
> 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/
>>
>> Signed-off-by: John Keeping <john@metanate.com>
>
> Reviewed-by: Jaehoon Chung <jh80.chung@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;
>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: dwmmc: return a proper error code when busy
2022-01-11 23:38 ` Jaehoon Chung
@ 2022-01-12 11:11 ` John Keeping
2022-01-12 23:42 ` Jaehoon Chung
0 siblings, 1 reply; 7+ messages in thread
From: John Keeping @ 2022-01-12 11:11 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: u-boot, Peng Fan
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@metanate.com>
> >
> > Reviewed-by: Jaehoon Chung <jh80.chung@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;
> >>
> >
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: dwmmc: return a proper error code when busy
2022-01-12 11:11 ` John Keeping
@ 2022-01-12 23:42 ` Jaehoon Chung
0 siblings, 0 replies; 7+ messages in thread
From: Jaehoon Chung @ 2022-01-12 23:42 UTC (permalink / raw)
To: John Keeping; +Cc: u-boot, Peng Fan
On 1/12/22 8:11 PM, John Keeping wrote:
> 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://protect2.fireeye.com/v1/url?k=887b401c-d7e0790d-887acb53-0cc47a31cdbc-5fff461e625e1ff5&q=1&e=e07e0f85-41c3-4e09-870a-cdcb715f39aa&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20211207160935.404395-1-john%40metanate.com%2F
>
> 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
>
>>>>
>>>> Signed-off-by: John Keeping <john@metanate.com>
>>>
>>> Reviewed-by: Jaehoon Chung <jh80.chung@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;
>>>>
>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: dwmmc: return a proper error code when busy
2021-12-07 16:09 ` John Keeping
@ 2021-12-07 23:55 ` Jaehoon Chung
0 siblings, 0 replies; 7+ messages in thread
From: Jaehoon Chung @ 2021-12-07 23:55 UTC (permalink / raw)
To: John Keeping, u-boot; +Cc: Peng Fan
On 12/8/21 1:09 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.
>
> Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Jaehoon Chung <jh80.chung@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;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] mmc: dwmmc: return a proper error code when busy
@ 2021-12-07 16:09 ` John Keeping
2021-12-07 23:55 ` Jaehoon Chung
0 siblings, 1 reply; 7+ messages in thread
From: John Keeping @ 2021-12-07 16:09 UTC (permalink / raw)
To: u-boot; +Cc: John Keeping, Peng Fan, Jaehoon Chung
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>
---
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-12 23:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220111161540epcas1p2e4b932a2f4811faa231669f70880f3dc@epcas1p2.samsung.com>
2022-01-11 16:15 ` [PATCH] mmc: dwmmc: return a proper error code when busy John Keeping
2022-01-11 22:12 ` Jaehoon Chung
2022-01-11 23:38 ` Jaehoon Chung
2022-01-12 11:11 ` John Keeping
2022-01-12 23:42 ` Jaehoon Chung
[not found] <CGME20211207160950epcas1p1226e9983967c0baf413d1b7a1530daa3@epcas1p1.samsung.com>
2021-12-07 16:09 ` John Keeping
2021-12-07 23:55 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.