Message ID | 1383775642-647-7-git-send-email-arend@broadcom.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Wed, 2013-11-06 at 23:07 +0100, Arend van Spriel wrote: > 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. [] > diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c [] > + if (err_ret) { Maybe better as: if (err_ret && net_ratelimit()) { ? > + /* > + * 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); > + } -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/07/2013 12:53 AM, Joe Perches wrote: > On Wed, 2013-11-06 at 23:07 +0100, Arend van Spriel wrote: >> 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. > [] >> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c > [] >> + if (err_ret) { > > Maybe better as: > > if (err_ret && net_ratelimit()) { ? Hi Joe, It actually does not occur that much. It prints a few lines every 5-10 seconds. I guess net_ratelimit() does not kick in. To boot brcmf_err() already has net_ratelimit(). Regards, Arend >> + /* >> + * 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); >> + } > > > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 905704e..009d2a0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -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; }