Bug 238383 - dkms should rerun start_udev if new modules are built
Summary: dkms should rerun start_udev if new modules are built
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dkms
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matt Domsch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-30 01:33 UTC by Jon Nettleton
Modified: 2007-11-30 22:12 UTC (History)
5 users (show)

Fixed In Version: 2.0.17.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-29 03:38:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jon Nettleton 2007-04-30 01:33:43 UTC
Description of problem:
start_udev is run before dkms_autoinstaller during the boot process.  By
re-running start_udev if new modules are installed, the supported hardware will
be re-detected and the proper modules loaded.  This is very important for
hotplug devices with out of kernel drivers.

I would attach a patch, but this is pretty basic behaviour.

Comment 1 Matt Domsch 2007-09-20 03:08:05 UTC
I'm sorry, this had escaped me for so long.  Adding Harald for his perspective
on calling start_udev, as it's not something I've looked into before.

Harald, if new modules are built and installed into the /lib/modules tree, and
depmod is run, does udev need to know of this?

Comment 2 Matt Domsch 2007-09-20 03:09:34 UTC
Adding Kay for his perspective as well.

Comment 3 Kay Sievers 2007-09-20 06:32:08 UTC
It's probably enough to run:
  udevtrigger
or even:
  udevtrigger --subsystem-match=<bus> --subsystem-match=<bus>
if you know the buses you installed drivers for.

Comment 4 Harald Hoyer 2007-09-20 09:27:41 UTC
Kay was faster :)

Comment 5 Jon Nettleton 2007-09-20 11:54:11 UTC
That all sounds good.  I am also working on adding dkms support to the
new-kernel-pkg script.  This will allow dkms kernel modules to be built and
removed directly from kernel rpm scripts.  This should allow for better
notification if a dkms module fails to build and can allow us to "fallback" to
the last fully working kernel until the problem is fixed.

Comment 6 Matt Domsch 2007-09-20 14:08:55 UTC
Here's what I'm proposing to put into DKMS to address this.  This goes at the
end of 'dkms install'.  How's this look?  Without parsing the module for
modinfo, I don't know the bus.  Should I do something like:

modinfo aic7xxx.ko | grep ^alias | awk '{print $2}' | awk -F: '{print $1}'

to get each of the busses and pass that?


diff --git a/dkms b/dkms
index 13dbc54..98ce503 100755
--- a/dkms
+++ b/dkms
@@ -1247,6 +1247,11 @@ function install_module()
        fi
     fi
 
+    # Notify udev if we installed something for the currently running kernel
+    if [ -x /sbin/udevtrigger -a "${kernelver_array[0]}" == "$(uname -r)" -a
"${arch_array[0]}" == "$(uname -m)" ]; then
+       /sbin/udevtrigger
+    fi
+
     echo $""
     echo $"DKMS: install Completed."
 }


Comment 7 Matt Domsch 2007-10-29 03:38:17 UTC
2.0.17.5 is released with the above patch.  Closing.


Note You need to log in before you can comment on or make changes to this bug.