Skip to content

Commit c35cc1f

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
bcm2835-sdhost: Don't log timeout errors unless debug=1
The MMC card-discovery process generates timeouts. This is expected behaviour, so reporting it to the user serves no purpose. Suppress the reporting of timeout errors unless the debug flag is on.
1 parent 6b2ffdf commit c35cc1f

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

drivers/mmc/host/bcm2835-sdhost.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -966,19 +966,15 @@ static void bcm2835_sdhost_finish_command(struct bcm2835_host *host)
966966
mmc_hostname(host->mmc));
967967
} else {
968968
if (sdhsts & SDHSTS_CMD_TIME_OUT) {
969-
switch (host->cmd->opcode) {
970-
case 5: case 52: case 53:
971-
/* Don't warn about SDIO commands */
972-
break;
973-
default:
974-
pr_err("%s: command timeout\n",
975-
mmc_hostname(host->mmc));
976-
break;
977-
}
969+
if (host->debug)
970+
pr_err("%s: command %d timeout\n",
971+
mmc_hostname(host->mmc),
972+
host->cmd->opcode);
978973
host->cmd->error = -ETIMEDOUT;
979974
} else {
980-
pr_err("%s: unexpected command error\n",
981-
mmc_hostname(host->mmc));
975+
pr_err("%s: unexpected command %d error\n",
976+
mmc_hostname(host->mmc),
977+
host->cmd->opcode);
982978
bcm2835_sdhost_dumpregs(host);
983979
host->cmd->error = -EIO;
984980
}

0 commit comments

Comments
 (0)