Re: Vendor driver vs Kernel, which one gets priority?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you so much for detailed advise!!

Best regards,

2022년 10월 20일 (목) 오전 2:03, Bjørn Mork <bjorn@xxxxxxx>님이 작성:
Do Hak Yong <crazyraven@xxxxxxxxx> writes:

> Hello kernel experts,
>
> I have a few questions about the priority of kernel drivers and third party
> drivers.
>
> If I install a third party vendor driver, which has the same module name as
> kernel provides, for example, Qlogic driver has the same module name as
> third party driver(qla2xxx).
>
> The questions are:
>
> Q1. Which driver has higher priority and which driver will be used? will
> there any be problems?

See depmod.d(5).

Unless overridden by config, modules in /lib/modules/$(uname -r)/updates
have priority over other modules.  This can be used to replace kernel
modules with a third party driver.

The third party driver could also use a startup script to forcibly
replace already loaded modules.

> Q2. How to control which driver the os will use?

If the file names are identical, then use the "updates" directory or
configure another location to have priority over the kernel modules.

If the file names are different, then you can blacklist the kernel
module to make sure the third party module is the only one available for
auto-loading.  See modprobe.d(5)

> Q3. What if the updated kernel installed and provied higher driver version
> than third party? Which one will be used then?

The default is to consider only the modules in /lib/modules/$(uname -r)

Any third party module must be updated along with the kerne.  Or copied
into the new location if binary compatible. But that's not likely in
general.

> I think third party drivers have more precedence that kernel drivers refer
> to below Red Hat KB, but I'm not sure which one will be used when the
> kernel has updated.
>
> https://access.redhat.com/solutions/176213

Redhat uses a more complex depmod configuration than default.  You
should probably ask them about their setup.  Or just look at the config
in /etc/depmod.d/*.conf


Bjørn
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux