summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--loader2/modules.c47
2 files changed, 55 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b976d69a..26b9da8a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2004-11-04 Jeremy Katz <katzj@redhat.com>
+ * loader2/modules.c (lateModuleSort): Implement an additional sort
+ to move drivers to the end of our list of drivers to load. This
+ is handy for, eg, fibre channel so that it doesn't end up at the
+ front of the list so that people don't get confused with sda being
+ their FC disk. Also, put ibmvscsic in the list due to #137920
+
+ * loader2/module-info: More qlogic fibre channel adapters
+
* upgrade.py (upgradeFindPackages): Key iiimf-le-canna off of
kinput2-canna-wnn6 instead of just kinput2 (#129218)
diff --git a/loader2/modules.c b/loader2/modules.c
index 1a69f3e2f..78cdbffb4 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -361,6 +361,52 @@ static int loadModule(const char * modName, struct extractedModule * path,
return rc;
}
+/*
+ * This takes the list of modules we're going to load and sorts
+ * some to be at the end on an arbitrary criteria (eg, fiberchannel).
+ * This should help the problems where people's FC controller ends up being
+ * sda and they then can't boot or otherwise have things being strange.
+ * And yes, this is a hack. *sigh*
+ */
+static char ** lateModuleSort(char **allmods, int num) {
+ int i, j, k, l;
+ char ** modList;
+ /* the qlogic drivers are usually for fibrechannel according to coughlan
+ * as is lpfc. ibmvscsic needs to be sure to be loaded after ipr on
+ * power5 due to bug #137920 */
+ char * lateList[] = { "qla2100", "qla2200", "qla2300", "qla2322",
+ "qla6312", "qla6322",
+ "lpfc", "ibmvscsic", NULL };
+ char ** lateMods;
+
+ modList = alloca(sizeof(*modList) * (num + 1));
+
+ lateMods = alloca(sizeof(*lateMods) * 10);
+ lateMods = memset(lateMods, 0, 10);
+
+ i = j = k = l = 0;
+
+ for (; allmods[i]; i++) {
+ int late = 0;
+ for (j = 0; lateList[j]; j++) {
+ if (!strcmp(allmods[i], lateList[j])) {
+ lateMods[l++] = allmods[i];
+ late = 1;
+ break;
+ }
+ }
+ if (!late)
+ modList[k++] = allmods[i];
+ }
+
+ for (i = 0; i < l; i++) {
+ modList[k++] = lateMods[i];
+ }
+ modList[k] = NULL;
+
+ return modList;
+}
+
/* handle loading a set of modules including their dependencies. also has
* a nasty evil hack for handling usb-storage removal/reloading for scsi
* device ordering. */
@@ -422,6 +468,7 @@ static int doLoadModules(const char * origModNames, moduleList modLoaded,
logMessage("ERROR: loop in module dependencies; not inserting");
return 1;
}
+ list = lateModuleSort(list, i);
for (i = 0; list[i]; i++) {
strcat(items, " ");