mbox series

[0/2] brcmfmac: Demote some kernel errors to info

Message ID 20230416-brcmfmac-noise-v1-0-f0624e408761@marcan.st
Headers show
Series brcmfmac: Demote some kernel errors to info | expand

Message

Hector Martin April 16, 2023, 12:42 p.m. UTC
brcmfmac has some messages that are KERN_ERR even though they are
harmless. This is spooking and confusing people, because they end up
being the *only* kernel messages on their boot console with common
error-only printk levels (at least on Apple Macs).

Then, when their system does not boot to a GUI for some other reason,
the brcmfmac errors are the only thing on their TTY (which also does
not show a login prompt on tty1 in typical systemd setups) and they are
thoroughly confused into believing their problem has something to do
with brcmfmac.

Seriously, I've had 10 or so people mention this by now, and multiple
confused Reddit threads about it. Let's fix it.

Signed-off-by: Hector Martin <marcan@marcan.st>
---
Hector Martin (2):
      wifi: brcmfmac: Demote vendor-specific attach/detach messages to info
      wifi: brcmfmac: Demote p2p unknown frame error to info (once)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c      | 4 ++--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230416-brcmfmac-noise-2bae83836f2d

Best regards,

Comments

Greg Kroah-Hartman April 16, 2023, 12:46 p.m. UTC | #1
On Sun, Apr 16, 2023 at 09:42:17PM +0900, Hector Martin wrote:
> People are getting spooked by brcmfmac errors on their boot console.
> There's no reason for these messages to be errors.
> 
> Cc: stable@vger.kernel.org
> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
> Signed-off-by: Hector Martin <marcan@marcan.st>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> index ac3a36fa3640..c83bc435b257 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> @@ -12,13 +12,13 @@
>  
>  static int brcmf_bca_attach(struct brcmf_pub *drvr)
>  {
> -	pr_err("%s: executing\n", __func__);
> +	pr_info("%s: executing\n", __func__);

Why are these here at all?  Please just remove these entirely, you can
get this information normally with ftrace.

Or, just delete these functions, why have empty ones at all?

thanks,

greg k-h
Kalle Valo April 17, 2023, 5:20 a.m. UTC | #2
Greg KH <gregkh@linuxfoundation.org> writes:

> On Sun, Apr 16, 2023 at 09:42:17PM +0900, Hector Martin wrote:
>
>> People are getting spooked by brcmfmac errors on their boot console.
>> There's no reason for these messages to be errors.
>> 
>> Cc: stable@vger.kernel.org
>> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
>> Signed-off-by: Hector Martin <marcan@marcan.st>
>> ---
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
>>  3 files changed, 6 insertions(+), 6 deletions(-)
>> 
>> diff --git
>> a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> index ac3a36fa3640..c83bc435b257 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> @@ -12,13 +12,13 @@
>>  
>>  static int brcmf_bca_attach(struct brcmf_pub *drvr)
>>  {
>> -	pr_err("%s: executing\n", __func__);
>> +	pr_info("%s: executing\n", __func__);
>
> Why are these here at all?  Please just remove these entirely, you can
> get this information normally with ftrace.
>
> Or, just delete these functions, why have empty ones at all?

Yeah, deleting these sound like the best idea.
Hector Martin April 17, 2023, 7:54 a.m. UTC | #3
On 16/04/2023 21.46, Greg KH wrote:
> On Sun, Apr 16, 2023 at 09:42:17PM +0900, Hector Martin wrote:
>> People are getting spooked by brcmfmac errors on their boot console.
>> There's no reason for these messages to be errors.
>>
>> Cc: stable@vger.kernel.org
>> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
>> Signed-off-by: Hector Martin <marcan@marcan.st>
>> ---
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
>>  3 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> index ac3a36fa3640..c83bc435b257 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>> @@ -12,13 +12,13 @@
>>  
>>  static int brcmf_bca_attach(struct brcmf_pub *drvr)
>>  {
>> -	pr_err("%s: executing\n", __func__);
>> +	pr_info("%s: executing\n", __func__);
> 
> Why are these here at all?  Please just remove these entirely, you can
> get this information normally with ftrace.
> 
> Or, just delete these functions, why have empty ones at all?

This is a new WIP code path that Arend introduced which currently
deliberately does nothing (but is intended to hold firmware vendor
specific init in the future). So we can just drop the messages, but I
don't think we want to remove the code entirely.

- Hector
Greg Kroah-Hartman April 17, 2023, 8:06 a.m. UTC | #4
On Mon, Apr 17, 2023 at 04:54:33PM +0900, Hector Martin wrote:
> On 16/04/2023 21.46, Greg KH wrote:
> > On Sun, Apr 16, 2023 at 09:42:17PM +0900, Hector Martin wrote:
> >> People are getting spooked by brcmfmac errors on their boot console.
> >> There's no reason for these messages to be errors.
> >>
> >> Cc: stable@vger.kernel.org
> >> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
> >> Signed-off-by: Hector Martin <marcan@marcan.st>
> >> ---
> >>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
> >>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
> >>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
> >>  3 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> >> index ac3a36fa3640..c83bc435b257 100644
> >> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> >> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> >> @@ -12,13 +12,13 @@
> >>  
> >>  static int brcmf_bca_attach(struct brcmf_pub *drvr)
> >>  {
> >> -	pr_err("%s: executing\n", __func__);
> >> +	pr_info("%s: executing\n", __func__);
> > 
> > Why are these here at all?  Please just remove these entirely, you can
> > get this information normally with ftrace.
> > 
> > Or, just delete these functions, why have empty ones at all?
> 
> This is a new WIP code path that Arend introduced which currently
> deliberately does nothing (but is intended to hold firmware vendor
> specific init in the future). So we can just drop the messages, but I
> don't think we want to remove the code entirely.

Why have empty functions that do nothing?  If you want to put
vendor-specific anything in here, add it when that is needed.  We don't
like having dead code laying around in the kernel if at all possible.

thanks,

greg k-h
Hector Martin April 17, 2023, 8:13 a.m. UTC | #5
On 17/04/2023 17.06, Greg KH wrote:
> On Mon, Apr 17, 2023 at 04:54:33PM +0900, Hector Martin wrote:
>> On 16/04/2023 21.46, Greg KH wrote:
>>> On Sun, Apr 16, 2023 at 09:42:17PM +0900, Hector Martin wrote:
>>>> People are getting spooked by brcmfmac errors on their boot console.
>>>> There's no reason for these messages to be errors.
>>>>
>>>> Cc: stable@vger.kernel.org
>>>> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
>>>> Signed-off-by: Hector Martin <marcan@marcan.st>
>>>> ---
>>>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c | 4 ++--
>>>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c | 4 ++--
>>>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c | 4 ++--
>>>>  3 files changed, 6 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>>>> index ac3a36fa3640..c83bc435b257 100644
>>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
>>>> @@ -12,13 +12,13 @@
>>>>  
>>>>  static int brcmf_bca_attach(struct brcmf_pub *drvr)
>>>>  {
>>>> -	pr_err("%s: executing\n", __func__);
>>>> +	pr_info("%s: executing\n", __func__);
>>>
>>> Why are these here at all?  Please just remove these entirely, you can
>>> get this information normally with ftrace.
>>>
>>> Or, just delete these functions, why have empty ones at all?
>>
>> This is a new WIP code path that Arend introduced which currently
>> deliberately does nothing (but is intended to hold firmware vendor
>> specific init in the future). So we can just drop the messages, but I
>> don't think we want to remove the code entirely.
> 
> Why have empty functions that do nothing?  If you want to put
> vendor-specific anything in here, add it when that is needed.  We don't
> like having dead code laying around in the kernel if at all possible.

That's a question for Arend. But I think we should not be blocking this
fix on that. I'll send a v2 that just removes the messages.


- Hector