mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "brcm80211-dev-list.pdl@broadcom.com" 
	<brcm80211-dev-list.pdl@broadcom.com>,
	Arend van Spriel <aspriel@gmail.com>,
	Chung-hsien Hsu <chung-hsien.hsu@infineon.com>,
	Chi-hsien Lin <chi-hsien.lin@infineon.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Wright Feng <wright.feng@infineon.com>,
	"SHA-cyfmac-dev-list@infineon.com"
	<SHA-cyfmac-dev-list@infineon.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Kalle Valo <kvalo@codeaurora.org>,
	Franky Lin <franky.lin@broadcom.com>
Subject: Re: [PATCH] brcmfmac: pcie: fix oops on failure to resume and reprobe
Date: Tue, 17 Aug 2021 14:07:22 +0200	[thread overview]
Message-ID: <85e30fb4-ce7d-6402-f93e-09efadbbcd06@pengutronix.de> (raw)
In-Reply-To: <e59b23ba-7e5b-00e3-e8c9-f5c2bb89b860@pengutronix.de>

On 17.08.21 14:03, Ahmad Fatoum wrote:
> On 17.08.21 13:54, Andy Shevchenko wrote:
>> On Tue, Aug 17, 2021 at 2:11 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>>> On 17.08.21 13:02, Andy Shevchenko wrote:
>>>> On Tuesday, August 17, 2021, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>>
>> ...
>>
>>>>>         err = brcmf_pcie_probe(pdev, NULL);
>>>>>         if (err)
>>>>> -               brcmf_err(bus, "probe after resume failed, err=%d\n", err);
>>>>> +               __brcmf_err(NULL, __func__, "probe after resume failed,
>>>>> err=%d\n",
>>>>
>>>>
>>>> This is weird looking line now. Why can’t you simply use dev_err() /
>>>> netdev_err()?
>>>
>>> That's what brcmf_err normally expands to, but in this file the macro
>>> is overridden to add the extra first argument.
>>
>> So, then the problem is in macro here. You need another portion of
>> macro(s) that will use the dev pointer directly. When you have a valid
>> device, use it. And here it seems the case.
> 
> Ah, you mean using pdev instead of the stale bus. Ye, I could do that.
> Thanks for pointing out.

Ah, not so easy: __brcmf_err accepts a struct brcmf_bus * as first argument,
but there is none I can pass along. As the whole file uses the brcm_
logging functions, I'd just leave this one without a device.

> 
>>
>>> The brcmf_ logging function write to brcmf trace buffers. This is not
>>> done with netdev_err/dev_err (and replacing the existing logging
>>> is out of scope for a regression fix anyway).
>>
>> I see.
>>
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2021-08-17 12:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  6:35 Ahmad Fatoum
2021-08-17 10:01 ` Ahmad Fatoum
     [not found] ` <CAHp75Vfc_T04p95PgVUd+CK+ttPwX2aOC4WPD35Z01WQV1MxKw@mail.gmail.com>
2021-08-17 11:11   ` Ahmad Fatoum
2021-08-17 11:54     ` Andy Shevchenko
2021-08-17 12:03       ` Ahmad Fatoum
2021-08-17 12:07         ` Ahmad Fatoum [this message]
2021-08-17 13:06           ` Andy Shevchenko
2021-08-17 13:19             ` Ahmad Fatoum
2021-08-29 11:45 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85e30fb4-ce7d-6402-f93e-09efadbbcd06@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=chi-hsien.lin@infineon.com \
    --cc=chung-hsien.hsu@infineon.com \
    --cc=davem@davemloft.net \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wright.feng@infineon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®