mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 master] mci: bcm2835: return command timeout silently
@ 2023-04-14 17:48 Ahmad Fatoum
  2023-04-17  6:53 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-04-14 17:48 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Some commands are expected to time out, for example when a non
SDIO card is tested for being an SDIO card. Just return -ETIMEDOUT
in that case and leave error message prints to the core.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
  - target master
  - reword commit message title
---
 drivers/mci/mci-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index bcdf1b6196de..477a3b83a0e3 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -148,7 +148,7 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd,
 		      command << 16 | transfer_mode);
 
 	ret = bcm2835_mci_wait_command_done(host);
-	if (ret) {
+	if (ret && ret != -ETIMEDOUT) {
 		dev_err(host->hw_dev, "Error while executing command %d\n",
 				cmd->cmdidx);
 		dev_err(host->hw_dev, "Status: 0x%X, Interrupt: 0x%X\n",
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 master] mci: bcm2835: return command timeout silently
  2023-04-14 17:48 [PATCH v2 master] mci: bcm2835: return command timeout silently Ahmad Fatoum
@ 2023-04-17  6:53 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-04-17  6:53 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Fri, Apr 14, 2023 at 07:48:54PM +0200, Ahmad Fatoum wrote:
> Some commands are expected to time out, for example when a non
> SDIO card is tested for being an SDIO card. Just return -ETIMEDOUT
> in that case and leave error message prints to the core.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> v1 -> v2:
>   - target master
>   - reword commit message title
> ---
>  drivers/mci/mci-bcm2835.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
> index bcdf1b6196de..477a3b83a0e3 100644
> --- a/drivers/mci/mci-bcm2835.c
> +++ b/drivers/mci/mci-bcm2835.c
> @@ -148,7 +148,7 @@ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd,
>  		      command << 16 | transfer_mode);
>  
>  	ret = bcm2835_mci_wait_command_done(host);
> -	if (ret) {
> +	if (ret && ret != -ETIMEDOUT) {
>  		dev_err(host->hw_dev, "Error while executing command %d\n",
>  				cmd->cmdidx);
>  		dev_err(host->hw_dev, "Status: 0x%X, Interrupt: 0x%X\n",
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-17  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 17:48 [PATCH v2 master] mci: bcm2835: return command timeout silently Ahmad Fatoum
2023-04-17  6:53 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox