linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Q: What will happen if I insmod a new version driver when it has already been statically in kernel?
@ 2012-08-27 10:06 Yang Bai
  2012-08-27 23:38 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Bai @ 2012-08-27 10:06 UTC (permalink / raw)
  To: linux-kernel

Hi all,

We have one driver which has been statically compiled into kernel, and
now we want to upgrade it. But we only have a new version module for
this driver. Could I just insmod this module and make the new driver
work?

If so, what happens to the static old one?

If not, Can we upgrade this driver without re-compile the kernel to
make the in-kernel driver out or module?

Thanks,
Yang

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Q: What will happen if I insmod a new version driver when it has already been statically in kernel?
  2012-08-27 10:06 Q: What will happen if I insmod a new version driver when it has already been statically in kernel? Yang Bai
@ 2012-08-27 23:38 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2012-08-27 23:38 UTC (permalink / raw)
  To: Yang Bai; +Cc: linux-kernel

On 08/27/2012 03:06 AM, Yang Bai wrote:

> Hi all,
> 
> We have one driver which has been statically compiled into kernel, and
> now we want to upgrade it. But we only have a new version module for
> this driver. Could I just insmod this module and make the new driver
> work?

No, that should not work -- unless the in-kernel driver has a
close/release method that you can somehow trigger.


> If so, what happens to the static old one?

It stays.

> If not, Can we upgrade this driver without re-compile the kernel to
> make the in-kernel driver out or module?


If the current driver is not a loadable module, you cannot
replace it.  Assuming that they use mostly the same resources,
like I/O devices or memory BARs or however the device presents
its control & data interfaces, the new module would not be
able to access the device interfaces since they would still
be used/owned by the in-kernel driver.



-- 
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-27 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-27 10:06 Q: What will happen if I insmod a new version driver when it has already been statically in kernel? Yang Bai
2012-08-27 23:38 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).