Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 10-18-2021, 04:54 PM   #1
LQ Newbie
Registered: Oct 2021
Posts: 1

Rep: Reputation: Disabled
module load order causing failure

I have an issue, where a kernel driver module I'm working on is calling an ACPI method. This method is accessing IPMI operation region, which will fail if the driver for the IPMI controller isn't loaded yet... so, during boot, my module gets loaded, and it fails, and almost immediately afterward the IPMI driver is loaded. If I then unload and reload my driver, it will work.

But my driver does not DEPEND on IPMI... it just happens to depend on it in this system, because the ACPI method I'm running uses an IPMI Op Region (though it likely does not do so on some systems). So my driver could work just fine on other systems that don't even have IPMI. The ACPI method I'm running is a _DSM that's under a PCI device in an ?SDT ACPI table, FWIW.

Is there any way to make this just work right, without having to add special udev rules or scripts just for this system? I'm not sure what the right solution would be.
Old 10-20-2021, 10:27 AM   #2
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,860
Blog Entries: 16

Rep: Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437Reputation: 3437
The modprobe.d man page suggests this, which could be what you need:
install modulename command...
This is the most powerful primitive: it tells modprobe to run your command instead of inserting the module in the kernel as normal. The command can be any shell command: this allows you to do any kind of complex processing you might wish. For example, if the module "fred" works better with the module "barney" already installed (but it doesn't depend on it, so modprobe won't automatically load it), you could say "install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred", which would do what you wanted. Note the --ignore-install, which stops the second modprobe from running the same install command again.

Last edited by hazel; 10-20-2021 at 10:29 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logi Sales Manager on Ncurses (invoice, invoicing, orders, order, sale order, sales order...)? Xeratul Linux - Software 0 03-25-2017 03:45 PM
[SOLVED] Failure after failure after failure.....etc 69Rixter Linux - Laptop and Netbook 5 04-14-2015 10:58 AM
RHEL 6 : module load order changed in initramfs neo3matrix Linux - Kernel 3 09-12-2012 11:00 AM
Module load order. Dark666 Linux - General 6 07-04-2008 01:47 PM
PHP 5.1.2 module causing apache to not load Jalalabee Linux - Newbie 3 03-31-2006 05:35 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration