[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <284f6f33-1789-341b-e123-f6b2b706b68b@lwfinger.net>
Date: Wed, 22 Mar 2023 20:36:59 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Ping-Ke Shih <pkshih@...ltek.com>,
Jonas Gorski <jonas.gorski@...il.com>
Cc: Hyeonggon Yoo <42.hyeyoo@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
Subject: Re: [BUG v6.2.7] Hitting BUG_ON() on rtw89 wireless driver startup
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
Powered by blists - more mailing lists