diff options
-rw-r--r-- | isys/devnodes.c | 9 | ||||
-rw-r--r-- | isys/probe.c | 46 | ||||
-rw-r--r-- | loader/module-info | 3 |
3 files changed, 58 insertions, 0 deletions
diff --git a/isys/devnodes.c b/isys/devnodes.c index b37baaee5..c53728365 100644 --- a/isys/devnodes.c +++ b/isys/devnodes.c @@ -140,6 +140,15 @@ int devMakeInode(char * devName, char * path) { minor = (devName[9] - '0') * 16; /* disk */ if (strlen(devName) > 10) /* partition */ minor += atoi(devName + 11); + } else if (!strncmp(devName, "i2o/", 4)) { + /* I2O Block Device "i2o/hda */ + type = S_IFBLK; + major = 80; /* controller */ + minor = (devName[6] - 'a')*16; + if ((devName[7]) && isdigit(devName[7])) + { + minor = minor + atoi(devName + 7); + } } else { for (i = 0; i < numDevices; i++) { if (!strcmp(devices[i].name, devName)) break; diff --git a/isys/probe.c b/isys/probe.c index e8fde16ca..2b9fc7cfd 100644 --- a/isys/probe.c +++ b/isys/probe.c @@ -16,6 +16,7 @@ static int dac960GetDevices(struct knownDevices * devices); static int CompaqSmartArrayGetDevices(struct knownDevices * devices); static int CompaqSmartArray5300GetDevices(struct knownDevices * devices); +static int I2OGetDevices(struct knownDevices * devices, int code); static int readFD (int fd, char **buf) { @@ -262,6 +263,7 @@ int kdFindScsiList(struct knownDevices * devices, int code) { dac960GetDevices(devices); CompaqSmartArrayGetDevices(devices); CompaqSmartArray5300GetDevices(devices); + I2OGetDevices(devices, code); return 0; } @@ -280,6 +282,7 @@ int kdFindScsiList(struct knownDevices * devices, int code) { dac960GetDevices(devices); CompaqSmartArrayGetDevices(devices); CompaqSmartArray5300GetDevices(devices); + I2OGetDevices(devices, code); goto bye; } @@ -406,6 +409,7 @@ int kdFindScsiList(struct knownDevices * devices, int code) { dac960GetDevices(devices); CompaqSmartArrayGetDevices(devices); CompaqSmartArray5300GetDevices(devices); + I2OGetDevices(devices, code); qsort(devices->known, devices->numKnown, sizeof(*devices->known), sortDevices); @@ -513,6 +517,48 @@ static int CompaqSmartArrayGetDevices(struct knownDevices * devices) { return 0; } + +static int I2OGetDevices(struct knownDevices * devices, int code) { + struct kddevice newDevice; + FILE *f; + char buf[256]; + char *ptr; + int numMatches = 0, ctlNum = 0; + char ctl[40]; +/* +TODO: + Currently just allowing user to install on the + first I2O volume created. Look at I2O code, + it will guarantee that a bootable volume + always shows up as /dev/i2o/hda. The other + volumes may change device names if there is + TID reuse. + Other reason is that currently in 2.2 kernels + we cannot determine how many I2O volumes were + created via the /proc file system. Too cumbersome + to wade thru the syslog ! +*/ + sprintf(ctl, "i2o/hda"); + +/* +TODO: + There is currently no checking to see if + the I2O Block device /dev/i2o/hda ACTUALLY + exists. Consequently this hack should be used + only when installing on I2O devices. Otherwise + it will complain ! +*/ + if (!deviceKnown(devices, ctl)) { + newDevice.name = strdup(ctl); + newDevice.model = strdup("I2O Block Device"); + newDevice.class = CLASS_HD; + addDevice(devices, newDevice); + } + return 0; +} + + + static int CompaqSmartArray5300GetDevices(struct knownDevices * devices) { struct kddevice newDevice; FILE *f; diff --git a/loader/module-info b/loader/module-info index 6e655f56f..ac1493cbb 100644 --- a/loader/module-info +++ b/loader/module-info @@ -595,6 +595,9 @@ gdth # not a module # gvp11 +i2o_block + scsi + "I2O Block driver" imm scsi_hostadapter |