<div dir="auto"><div>Thank you so much for detailed advise!!</div><div dir="auto"><br></div><div dir="auto">Best regards,<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">2022년 10월 20일 (목) 오전 2:03, Bjørn Mork <<a href="mailto:bjorn@mork.no">bjorn@mork.no</a>>님이 작성:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do Hak Yong <<a href="mailto:crazyraven@gmail.com" target="_blank" rel="noreferrer">crazyraven@gmail.com</a>> writes:<br>
<br>
> Hello kernel experts,<br>
><br>
> I have a few questions about the priority of kernel drivers and third party<br>
> drivers.<br>
><br>
> If I install a third party vendor driver, which has the same module name as<br>
> kernel provides, for example, Qlogic driver has the same module name as<br>
> third party driver(qla2xxx).<br>
><br>
> The questions are:<br>
><br>
> Q1. Which driver has higher priority and which driver will be used? will<br>
> there any be problems?<br>
<br>
See depmod.d(5).<br>
<br>
Unless overridden by config, modules in /lib/modules/$(uname -r)/updates<br>
have priority over other modules.  This can be used to replace kernel<br>
modules with a third party driver.<br>
<br>
The third party driver could also use a startup script to forcibly<br>
replace already loaded modules.<br>
<br>
> Q2. How to control which driver the os will use?<br>
<br>
If the file names are identical, then use the "updates" directory or<br>
configure another location to have priority over the kernel modules.<br>
<br>
If the file names are different, then you can blacklist the kernel<br>
module to make sure the third party module is the only one available for<br>
auto-loading.  See modprobe.d(5)<br>
<br>
> Q3. What if the updated kernel installed and provied higher driver version<br>
> than third party? Which one will be used then?<br>
<br>
The default is to consider only the modules in /lib/modules/$(uname -r)<br>
<br>
Any third party module must be updated along with the kerne.  Or copied<br>
into the new location if binary compatible. But that's not likely in<br>
general.<br>
<br>
> I think third party drivers have more precedence that kernel drivers refer<br>
> to below Red Hat KB, but I'm not sure which one will be used when the<br>
> kernel has updated.<br>
><br>
> <a href="https://access.redhat.com/solutions/176213" rel="noreferrer noreferrer" target="_blank">https://access.redhat.com/solutions/176213</a><br>
<br>
Redhat uses a more complex depmod configuration than default.  You<br>
should probably ask them about their setup.  Or just look at the config<br>
in /etc/depmod.d/*.conf<br>
<br>
<br>
Bjørn<br>
</blockquote></div></div></div>