From: Greg KH <gregkh@linuxfoundation.org>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Problem with modprobe
Date: Tue, 27 Sep 2022 19:35:35 +0200 [thread overview]
Message-ID: <YzM0Z4gXsjZTDkX0@kroah.com> (raw)
In-Reply-To: <6c1ca180-8df7-c4d0-bd9f-d6b70f6c5142@lwfinger.net>
On Tue, Sep 27, 2022 at 12:11:24PM -0500, Larry Finger wrote:
> Hi,
>
> The driver for the Realtek RTL8821CE network card show some asymmetrical
> behavior between loading and unloading.
>
> Starting from scratch, a load command provides the expected results:
>
> finger@localhost:~/rtw88>sudo modprobe -v rtw88_8821ce
> insmod /lib/modules/6.1.0-rc3-wireless-next-00623-g2bc09edc7fa2-dirty/kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko
>
> insmod /lib/modules/6.1.0-rc3-wireless-next-00623-g2bc09edc7fa2-dirty/kernel/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko
>
> insmod /lib/modules/6.1.0-rc3-wireless-next-00623-g2bc09edc7fa2-dirty/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko
>
> insmod /lib/modules/6.1.0-rc3-wireless-next-00623-g2bc09edc7fa2-dirty/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821ce.ko
>
> Unloading produces a different result:
>
> finger@localhost:~/rtw88>sudo modprobe -rv rtw88_8821ce
> rmmod rtw88_8821ce
> rmmod rtw88_pci
> rmmod rtw88_8821c
>
> Note that rtw88_core is still loaded and needs to be unloaded separately:
>
> finger@localhost:~/rtw88>sudo modprobe -rv rtw88_core
> rmmod rtw88_core
>
> The appropriate lines from modules.dep reformatted for clarity are as follows:
>
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko:
> kernel/net/mac80211/mac80211.ko
> kernel/lib/crypto/libarc4.ko
> kernel/net/wireless/cfg80211.ko
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko:
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko
> kernel/net/mac80211/mac80211.ko
> kernel/lib/crypto/libarc4.ko
> kernel/net/wireless/cfg80211.ko
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821ce.ko:
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko
> kernel/net/mac80211/mac80211.ko
> kernel/lib/crypto/libarc4.ko
> kernel/net/wireless/cfg80211.ko
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko:
> kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko
> kernel/net/mac80211/mac80211.ko
> kernel/lib/crypto/libarc4.ko
> kernel/net/wireless/cfg80211.ko
>
> What is the explanation for the failure to auto-unload rtw88_core?
I don't think we ever auto-unload dependant modules as we don't know if
they are still in use or not (hint, module references is not a
representation if the module is in use or not.)
So this is working as intended, right? And how it's always worked?
thanks,
greg k-h
next prev parent reply other threads:[~2022-09-27 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 17:11 Problem with modprobe Larry Finger
2022-09-27 17:35 ` Greg KH [this message]
2022-09-27 18:25 ` Larry Finger
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=YzM0Z4gXsjZTDkX0@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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