Skip to contentSkip to conversation

mmc: sdhci: Log what timeout was set if the timeout is too large

PATCH In review Mark Brown 2 participants 2 messages Apr 10, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mmc: sdhci: Log what timeout was set if the timeout is too large

Rather than just logging that we came up with an excessively large timeout say what the timeout was, this may provide some clues as to what the issue is.

---

I'm seeing reams of these from my s3c64xx based system, looks like it's always coming out with a timeout of 0xf which is only just out of range.

 drivers/mmc/host/sdhci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +2 -2
index 9aa77f3..8407a0b 100644
@@ -680,8 +680,8 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
 	}
 
 	if (count >= 0xF) {
-		pr_warning("%s: Too large timeout requested for CMD%d!\n",
-		       mmc_hostname(host->mmc), cmd->opcode);
+		pr_warning("%s: Too large timeout %x requested for CMD%d!\n",
+			   mmc_hostname(host->mmc), count, cmd->opcode);
 		count = 0xE;
 	}
 
Signature · 1 line
1.7.9.1
#1 lore raw

Hi Mark,

Quoted 18 lines · Mark Brown

Rather than just logging that we came up with an excessively large timeout say what the timeout was, this may provide some clues as to what the issue is.

---

I'm seeing reams of these from my s3c64xx based system, looks like it's always coming out with a timeout of 0xf which is only just out of range.

 drivers/mmc/host/sdhci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 9aa77f3..8407a0b 100644

drivers/mmc/host/sdhci.c static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) · line 686

Quoted 9 lines
drivers/mmc/host/sdhci.c +2 -2
@@ -680,8 +680,8 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
 	}
 
 	if (count >= 0xF) {
-		pr_warning("%s: Too large timeout requested for CMD%d!\n",
-		       mmc_hostname(host->mmc), cmd->opcode);
+		pr_warning("%s: Too large timeout %x requested for CMD%d!\n",
+			   mmc_hostname(host->mmc), count, cmd->opcode);
 		count = 0xE;
 	}

Thanks, pushed to mmc-next for 3.5 with a trivial change:

drivers/mmc/host/sdhci.c +1 -1
index 8407a0b..6868893 100644
@@ -680,7 +680,7 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
 	}
 
 	if (count >= 0xF) {
-		pr_warning("%s: Too large timeout %x requested for CMD%d!\n",
+		pr_warning("%s: Too large timeout 0x%x requested for CMD%d!\n",
 			   mmc_hostname(host->mmc), count, cmd->opcode);
 		count = 0xE;
 	}

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child