brcmfmac: reduce logging noise accessing SDIO SleepCSR register
authorArend van Spriel <[email protected]>
Fri, 29 Nov 2013 10:48:18 +0000 (11:48 +0100)
committerJohn W. Linville <[email protected]>
Mon, 2 Dec 2013 19:25:18 +0000 (14:25 -0500)
The SleepCSR register is accessed to wakeup the device from the
host side. Depending on the state of the device this may take
multiple attempts. The failed attempt are not real failures so
reduce the log level specifically for this register. The calling
function will scream when the multiple attempts all failed.

Reviewed-by: Hante Meuleman <[email protected]>
Reviewed-by: Franky Lin <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c

index 905704e335d7164b90a4ecb6fd51c2324911c154..009d2a021b87e45930ddb74ccf7b1e20c296a7d8 100644 (file)
@@ -156,10 +156,21 @@ int brcmf_sdioh_request_byte(struct brcmf_sdio_dev *sdiodev, uint rw, uint func,
                }
        }
 
-       if (err_ret)
-               brcmf_err("Failed to %s byte F%d:@0x%05x=%02x, Err: %d\n",
-                         rw ? "write" : "read", func, regaddr, *byte, err_ret);
-
+       if (err_ret) {
+               /*
+                * SleepCSR register access can fail when
+                * waking up the device so reduce this noise
+                * in the logs.
+                */
+               if (regaddr != SBSDIO_FUNC1_SLEEPCSR)
+                       brcmf_err("Failed to %s byte F%d:@0x%05x=%02x, Err: %d\n",
+                                 rw ? "write" : "read", func, regaddr, *byte,
+                                 err_ret);
+               else
+                       brcmf_dbg(SDIO, "Failed to %s byte F%d:@0x%05x=%02x, Err: %d\n",
+                                 rw ? "write" : "read", func, regaddr, *byte,
+                                 err_ret);
+       }
        return err_ret;
 }