[Top] [All Lists]

Re: [Fwd: pcmcia ether drivers can't be unloaded]

To: Jeff Garzik <jgarzik@xxxxxxxxx>, shemminger@xxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx, Greg KH <greg@xxxxxxxxx>
Subject: Re: [Fwd: pcmcia ether drivers can't be unloaded]
From: Russell King <rmk@xxxxxxxxxxxxxxxx>
Date: Tue, 27 Jul 2004 23:36:14 +0100
In-reply-to: <41068BEF.7010200@xxxxxxxxx>; from jgarzik@xxxxxxxxx on Tue, Jul 27, 2004 at 01:07:59PM -0400
References: <41068BEF.7010200@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/
On Tue, Jul 27, 2004 at 01:07:59PM -0400, Jeff Garzik wrote:
> It looks like pcmica modular ether (example orinoco) can never be manually
> unloaded because module refcount is always 1. This comes from the owner
> field in the pcmcia_driver.owner being set.

Intended behaviour.  As long as the driver is bound to a socket, there are
references to the driver, so we need to keep the refcount non-zero.

Once the driver is unbound (by ejecting cards) then the ref count will
drop to zero and the module can be unloaded.

> One fix is to not set owner field but then there is a hot plug/module
> remove race. But the right fix seems to fix up pcmcia to be a true bus
> in the driver model and have the same hotplug as other buses; usb and
> pci don't have the problem.

No, the right fix is not to try to fsck with PCMCIA refcounting - it
isn't up to having drivers randomly unloaded.  IOW, it remains 2.4

Russell King
 Linux kernel    2.6 ARM Linux   -
 maintainer of:  2.6 PCMCIA      -
                 2.6 Serial core

<Prev in Thread] Current Thread [Next in Thread>