- /*
- * 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);