Patch: unable to mount root fs on 2.1.12[78]

Heinz Mauelshagen (mauelsha@ez-darmstadt.telekom.de)
Sun, 15 Nov 1998 1:26:01 MET


Hi everybody!

I figured out a solution for the problem by myself.

Actually, root can't be mounted if you have 12+n*16 for n=0 to n=7
SCSI disks installed in your system.

The following patch should fix it...
Jirka, please check this and incorporate it into the next releases.

Regards, Heinz

--- linux-2.1.128.orig/drivers/scsi/sd.c Mon Oct 26 23:04:21 1998
+++ linux-2.1.128/drivers/scsi/sd.c Sun Nov 15 00:56:43 1998
@@ -1540,8 +1540,14 @@
sd_gendisks[i].real_devices =
(void *) (rscsi_disks + i * SCSI_DISKS_PER_MAJOR);
}
- LAST_SD_GENDISK.max_nr =
- sd_template.dev_max % SCSI_DISKS_PER_MAJOR;
+
+ if ( sd_template.dev_max == 0)
+ LAST_SD_GENDISK.max_nr = 0;
+ else if ( sd_template.dev_max % SCSI_DISKS_PER_MAJOR == 0)
+ LAST_SD_GENDISK.max_nr = SCSI_DISKS_PER_MAJOR;
+ else
+ LAST_SD_GENDISK.max_nr = sd_template.dev_max % SCSI_DISKS_PER_MAJOR;
+
LAST_SD_GENDISK.next = NULL;
return 0;
}

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement Entwicklungsbereich 2 Deutsche Telekom AG Entwicklungszentrum Darmstadt Heinz Mauelshagen Otto-Roehm-Strasse 71c Postfach 10 05 41 mge@ez-darmstadt.telekom.de 64205 Darmstadt Germany +49 6151 886-425 FAX-386 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/