brcm2708: switch to linux 4.4 and update patches
[openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0222-bcm2835-sdhost-Don-t-log-timeout-errors-unless-debug.patch
1 From 190044f7b7a0b06d46de345f9c79f7991051b68d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 9 Dec 2015 11:38:15 +0000
4 Subject: [PATCH 222/222] bcm2835-sdhost: Don't log timeout errors unless
5  debug=1
6
7 The MMC card-discovery process generates timeouts. This is
8 expected behaviour, so reporting it to the user serves no purpose.
9 Suppress the reporting of timeout errors unless the debug flag
10 is on.
11 ---
12  drivers/mmc/host/bcm2835-sdhost.c | 18 +++++++-----------
13  1 file changed, 7 insertions(+), 11 deletions(-)
14
15 --- a/drivers/mmc/host/bcm2835-sdhost.c
16 +++ b/drivers/mmc/host/bcm2835-sdhost.c
17 @@ -966,19 +966,15 @@ static void bcm2835_sdhost_finish_comman
18                                         mmc_hostname(host->mmc));
19                 } else {
20                         if (sdhsts & SDHSTS_CMD_TIME_OUT) {
21 -                               switch (host->cmd->opcode) {
22 -                               case 5: case 52: case 53:
23 -                                       /* Don't warn about SDIO commands */
24 -                                       break;
25 -                               default:
26 -                                       pr_err("%s: command timeout\n",
27 -                                              mmc_hostname(host->mmc));
28 -                                       break;
29 -                               }
30 +                               if (host->debug)
31 +                                       pr_err("%s: command %d timeout\n",
32 +                                              mmc_hostname(host->mmc),
33 +                                              host->cmd->opcode);
34                                 host->cmd->error = -ETIMEDOUT;
35                         } else {
36 -                               pr_err("%s: unexpected command error\n",
37 -                                      mmc_hostname(host->mmc));
38 +                               pr_err("%s: unexpected command %d error\n",
39 +                                      mmc_hostname(host->mmc),
40 +                                      host->cmd->opcode);
41                                 bcm2835_sdhost_dumpregs(host);
42                                 host->cmd->error = -EIO;
43                         }