[rhel5-branch] infiniband: some drivers imply other drivers (#660684).

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

 



mlx4_core implies mlx4_en and mlx4_ib. cxgb3 implies iw_cxgb3.

This should be done by modprobe but is not, see '/etc/init.d/openibd' for
more details.

Also see ff80a995ae88dd3eaf967d571d26319edd6ca049.
---
 loader2/loader.c  |    9 ++-------
 loader2/modules.c |   20 ++++++++++++++++++++
 loader2/modules.h |    2 ++
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/loader2/loader.c b/loader2/loader.c
index cb91bee..84e9088 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -1733,13 +1733,8 @@ int main(int argc, char ** argv) {
         busProbe(modInfo, modLoaded, modDeps, 0);
     }
 
-    /*
-     * BUG#514971: If the mlx4_core is loaded load the mlx4_en too, since we do not use the modprobe rules
-     */
-    if(mlModuleInList("mlx4_core", modLoaded)){
-        logMessage(INFO, "mlx4_core module detected, trying to load the Ethernet part of it (mlx4_en)");
-        mlLoadModuleSet("mlx4_en", modLoaded, modDeps, modInfo);
-    }
+    /* do what the modprobe rules would otherwise have done do for us */
+    mlCustomLoads(modLoaded, modDeps, modInfo);
 
     /* If we got new devices from the DDs, they need their /dev/node to be created here */
     createPartitionNodes();
diff --git a/loader2/modules.c b/loader2/modules.c
index cb34dff..e15f07d 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -1123,6 +1123,26 @@ void loadKickstartModule(struct loaderData_s * loaderData, int argc,
                  loaderData->modInfo, args);
 }
 
+/*
+ * On an installed system there are files in /etc/modprobe.d. Those can do
+ * various tricky things when modules are being inserted through modprobe. We do
+ * not call modprobe in the RHEL5 loader so we need to workaround, thus this
+ * function.
+ */
+void mlCustomLoads(moduleList modLoaded, moduleDeps modDeps,
+                   moduleInfoSet modInfo)
+{
+    if (mlModuleInList("mlx4_core", modLoaded)) {
+        logMessage(INFO, "modules: mlx4_core present, loading mlx4_en and mlx4_ib");
+        mlLoadModuleSet("mlx4_en", modLoaded, modDeps, modInfo);
+        mlLoadModuleSet("mlx4_ib", modLoaded, modDeps, modInfo);
+    }
+    if (mlModuleInList("cxgb3", modLoaded)) {
+        logMessage(INFO, "modules: cxgb3 present, loading iw_cxgb3");
+        mlLoadModuleSet("iw_cxgb3", modLoaded, modDeps, modInfo);
+    }
+}
+
 void mlWriteBlacklist() {
     int fd;
     int i;
diff --git a/loader2/modules.h b/loader2/modules.h
index a12a235..eba8ea0 100644
--- a/loader2/modules.h
+++ b/loader2/modules.h
@@ -43,5 +43,7 @@ void writeScsiDisks(moduleList list);
 int removeLoadedModule(const char * modName, moduleList modLoaded);
 char * getModuleLocation(int version);
 
+void mlCustomLoads(moduleList modLoaded, moduleDeps modDeps,
+                   moduleInfoSet modInfo);
 void mlWriteBlacklist();
 #endif
-- 
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux