All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Ping-Ke Shih <pkshih@realtek.com>, Jonas Gorski <jonas.gorski@gmail.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [BUG v6.2.7] Hitting BUG_ON() on rtw89 wireless driver startup
Date: Wed, 22 Mar 2023 20:36:59 -0500	[thread overview]
Message-ID: <284f6f33-1789-341b-e123-f6b2b706b68b@lwfinger.net> (raw)
In-Reply-To: <e4f8e55f843041978098f57ecb7e558b@realtek.com>

On 3/22/23 19:59, Ping-Ke Shih wrote:
> diff --git a/pci.c b/pci.c
> index fe6c0efc..087de2e0 100644
> --- a/pci.c
> +++ b/pci.c
> @@ -3879,25 +3879,26 @@ int rtw89_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>          rtw89_pci_link_cfg(rtwdev);
>          rtw89_pci_l1ss_cfg(rtwdev);
> 
> -       ret = rtw89_core_register(rtwdev);
> -       if (ret) {
> -               rtw89_err(rtwdev, "failed to register core\n");
> -               goto err_clear_resource;
> -       }
> -
>          rtw89_core_napi_init(rtwdev);
> 
>          ret = rtw89_pci_request_irq(rtwdev, pdev);
>          if (ret) {
>                  rtw89_err(rtwdev, "failed to request pci irq\n");
> -               goto err_unregister;
> +               goto err_deinit_napi;
> +       }
> +
> +       ret = rtw89_core_register(rtwdev);
> +       if (ret) {
> +               rtw89_err(rtwdev, "failed to register core\n");
> +               goto err_free_irq;
>          }
> 
>          return 0;
> 
> -err_unregister:
> +err_free_irq:
> +       rtw89_pci_free_irq(rtwdev, pdev);
> +err_deinit_napi:
>          rtw89_core_napi_deinit(rtwdev);
> -       rtw89_core_unregister(rtwdev);
>   err_clear_resource:
>          rtw89_pci_clear_resource(rtwdev, pdev);
>   err_declaim_pci:

Hyeonggon,

I have tested the above patch and added it to my GitHub repo that I mentioned 
earlier. Using the repo, you will be able to get the new code without patching 
and regenerating an entire new kernel.

Larry


  reply	other threads:[~2023-03-23  1:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 15:54 [BUG v6.2.7] Hitting BUG_ON() on rtw89 wireless driver startup Hyeonggon Yoo
2023-03-22 16:57 ` Larry Finger
2023-03-22 20:52   ` Jonas Gorski
2023-03-23  0:59     ` Ping-Ke Shih
2023-03-23  1:36       ` Larry Finger [this message]
2023-03-23  1:41       ` Larry Finger
2023-03-23  8:36         ` Ping-Ke Shih

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=284f6f33-1789-341b-e123-f6b2b706b68b@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=42.hyeyoo@gmail.com \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.