Re: PCI hotplug w/ drivers linked statically vs. module

Greg KH (greg@kroah.com)
Mon, 10 Mar 2003 09:50:44 -0800


On Fri, Mar 07, 2003 at 09:27:40AM +0600, Stephen Cameron wrote:
>
> I noticed a difference in behavior with PCI hotplug, depending
> on if the driver in questino is loaded as a module, or statically
> linked.
>
> For example, the tg3 driver, hot-unplugging, then hot-replugging
> works seemingly well if the driver is a module, but differnetly (poorly?)
> if it is statically linked. (eth0 disappears and does not come
> back.)

Is the tg3 driver's remove() function actually being called? In looking
at the driver, the callback is declared properly, so it should be
present when building the driver into the kernel.

> So why the difference in behavior with PCI hotplug and drivers
> linked statically vs. as a module?

I have no idea right now, sorry.
Only thing I can think of is you have to mark the remove function as
"__devexit" and not "__exit" to make sure the function is really there
if CONFIG_HOTPLUG is enabled.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/