linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] mmc: sdhci: Increase sdhci_send_command timeout to 100ms
@ 2019-12-27 15:14 Peter Seiderer
  2020-01-07 13:58 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seiderer @ 2019-12-27 15:14 UTC (permalink / raw)
  To: linux-mmc; +Cc: Adrian Hunter, Ulf Hansson, Philipp Zabel

Fixes:
	$ mmc bootpart enable 1 1 /dev/mmcblk1
[ 2339.324062] mmc1: Controller never released inhibit bit(s).
[ 2339.329808] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 2339.336339] mmc1: sdhci: Sys addr:  0x11044000 | Version:  0x00000002
[ 2339.342933] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000001
[ 2339.349460] mmc1: sdhci: Argument:  0x03b34801 | Trn mode: 0x00000013
[ 2339.356048] mmc1: sdhci: Present:   0x01fd8008 | Host ctl: 0x00000031
[ 2339.362637] mmc1: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
[ 2339.369230] mmc1: sdhci: Wake-up:   0x00000008 | Clock:    0x0000001f
[ 2339.375943] mmc1: sdhci: Timeout:   0x0000000f | Int stat: 0x00000000
[ 2339.382542] mmc1: sdhci: Int enab:  0x117f100b | Sig enab: 0x117f100b
[ 2339.389257] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000003
[ 2339.395856] mmc1: sdhci: Caps:      0x07eb0000 | Caps_1:   0x0000a000
[ 2339.402577] mmc1: sdhci: Cmd:       0x0000061b | Max curr: 0x00ffffff
[ 2339.409291] mmc1: sdhci: Resp[0]:   0x00000800 | Resp[1]:  0xffffffff
[ 2339.415889] mmc1: sdhci: Resp[2]:   0x328f5903 | Resp[3]:  0x00000900
[ 2339.422602] mmc1: sdhci: Host ctl2: 0x00000008
[ 2339.427203] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x3fc79208
[ 2339.433913] mmc1: sdhci: ============================================

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 drivers/mmc/host/sdhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 275102c0a1bf..011b3d322826 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1364,8 +1364,8 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
 	    cmd->opcode == MMC_STOP_TRANSMISSION)
 		cmd->flags |= MMC_RSP_BUSY;
 
-	/* Wait max 10 ms */
-	timeout = 10;
+	/* Wait max 100 ms */
+	timeout = 100;
 
 	mask = SDHCI_CMD_INHIBIT;
 	if (sdhci_data_line_cmd(cmd))
-- 
2.24.0


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

* Re: [PATCH v1] mmc: sdhci: Increase sdhci_send_command timeout to 100ms
  2019-12-27 15:14 [PATCH v1] mmc: sdhci: Increase sdhci_send_command timeout to 100ms Peter Seiderer
@ 2020-01-07 13:58 ` Adrian Hunter
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2020-01-07 13:58 UTC (permalink / raw)
  To: Peter Seiderer, linux-mmc; +Cc: Ulf Hansson, Philipp Zabel

On 27/12/19 5:14 pm, Peter Seiderer wrote:
> Fixes:
> 	$ mmc bootpart enable 1 1 /dev/mmcblk1
> [ 2339.324062] mmc1: Controller never released inhibit bit(s).
> [ 2339.329808] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
> [ 2339.336339] mmc1: sdhci: Sys addr:  0x11044000 | Version:  0x00000002
> [ 2339.342933] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000001
> [ 2339.349460] mmc1: sdhci: Argument:  0x03b34801 | Trn mode: 0x00000013
> [ 2339.356048] mmc1: sdhci: Present:   0x01fd8008 | Host ctl: 0x00000031
> [ 2339.362637] mmc1: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
> [ 2339.369230] mmc1: sdhci: Wake-up:   0x00000008 | Clock:    0x0000001f
> [ 2339.375943] mmc1: sdhci: Timeout:   0x0000000f | Int stat: 0x00000000
> [ 2339.382542] mmc1: sdhci: Int enab:  0x117f100b | Sig enab: 0x117f100b
> [ 2339.389257] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000003
> [ 2339.395856] mmc1: sdhci: Caps:      0x07eb0000 | Caps_1:   0x0000a000
> [ 2339.402577] mmc1: sdhci: Cmd:       0x0000061b | Max curr: 0x00ffffff
> [ 2339.409291] mmc1: sdhci: Resp[0]:   0x00000800 | Resp[1]:  0xffffffff
> [ 2339.415889] mmc1: sdhci: Resp[2]:   0x328f5903 | Resp[3]:  0x00000900
> [ 2339.422602] mmc1: sdhci: Host ctl2: 0x00000008
> [ 2339.427203] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x3fc79208
> [ 2339.433913] mmc1: sdhci: ============================================
> 
> Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  drivers/mmc/host/sdhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 275102c0a1bf..011b3d322826 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1364,8 +1364,8 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
>  	    cmd->opcode == MMC_STOP_TRANSMISSION)
>  		cmd->flags |= MMC_RSP_BUSY;
>  
> -	/* Wait max 10 ms */
> -	timeout = 10;
> +	/* Wait max 100 ms */
> +	timeout = 100;

The inhibits bits should not be set, so I am not sure if this is just
papering over the real issue.  Did mmc (utils) return an error?  Was the
eMMC useable after the error?  Any chance of getting a register dump without
the very long console delays?  What device and host controller was it?  What
kernel version?

>  
>  	mask = SDHCI_CMD_INHIBIT;
>  	if (sdhci_data_line_cmd(cmd))
> 


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

end of thread, other threads:[~2020-01-07 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 15:14 [PATCH v1] mmc: sdhci: Increase sdhci_send_command timeout to 100ms Peter Seiderer
2020-01-07 13:58 ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).