From: Tony <tony.uestc@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: MOD_INC_USE_COUNT
Date: Tue, 15 Nov 2005 11:56:33 +0800 [thread overview]
Message-ID: <43795C71.6070108@gmail.com> (raw)
In-Reply-To: <20051113102930.GA16973@linux-mips.org>
Ralf Baechle wrote:
> On Thu, Nov 10, 2005 at 10:21:26PM +0800, Tony wrote:
>
>
>>But when the module is used by a net_device(interface is up), rmmod also
>>works. Strange, isn't it?
>
>
> Not strange at all. The typical network driver is implemented using
> pci_register_driver which will set the owner filed of the driver's struct
> driver which then is being used for internal reference counting. Other
> busses or line disciplines (SLIP, PPP, AX.25 ...) need to do the equivalent
> or the kernel will believe reference counting isn't necessary and it's
> ok to unload the module at any time.
>
> In which driver did you hit this problem?
>
> Ralf
>
I have a radio connected to host using ethernet. I'm writing a radio
driver that masquerade radio as a NIC. when the module is loaded, I just
register_netdev a net_device struct, while unregister_netdev at module
cleanup.
Tony
next prev parent reply other threads:[~2005-11-15 3:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-10 13:14 MOD_INC_USE_COUNT Tony
2005-11-10 14:03 ` MOD_INC_USE_COUNT linux-os (Dick Johnson)
2005-11-10 14:21 ` MOD_INC_USE_COUNT Tony
2005-11-10 15:28 ` MOD_INC_USE_COUNT linux-os (Dick Johnson)
2005-11-13 10:29 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-15 3:56 ` Tony [this message]
2005-11-15 15:34 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-16 7:39 ` MOD_INC_USE_COUNT Tony
2005-11-16 13:24 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-15 18:52 ` MOD_INC_USE_COUNT Stephen Hemminger
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=43795C71.6070108@gmail.com \
--to=tony.uestc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.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 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.