FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 09-09-2011, 02:25 PM
Ales Kozumplik
 
Default Mellanox: mlx4_core implies mlx4_en and mlx4_ib.

Also see ff80a995ae88dd3eaf967d571d26319edd6ca049.

Related: rhbz#660684
---
loader2/loader.c | 9 ++-------
loader2/modules.c | 16 ++++++++++++++++
loader2/modules.h | 2 ++
3 files changed, 20 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..881e2f1 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -1123,6 +1123,22 @@ 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);
+ }
+}
+
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org