summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2000-12-20 05:15:50 +0000
committergrog <grog@FreeBSD.org>2000-12-20 05:15:50 +0000
commit8b50fee5545b987cc80a56e45ad57112b3a9a547 (patch)
tree67dfdb9c9c9254e74aab4a6c69d18dca9228fede /sys/dev
parent15aa6846bdcd5f738c00405ba6be43e8065bf2ca (diff)
downloadFreeBSD-src-8b50fee5545b987cc80a56e45ad57112b3a9a547.zip
FreeBSD-src-8b50fee5545b987cc80a56e45ad57112b3a9a547.tar.gz
open_drive: Add support for more than 32 devices of a particular kind.
Requested by: Bernd Walter <ticso@cicely8.cicely.de> Cor Bosman <cor@xs4all.net> Kai Storbeck <kai@xs4all.net> Joe Greco <jgreco@ns.sol.net> Add support for Compaq SMART-2 RAID (idad) as storage device for Vinum subdisks. Reported by: Aaron Hill <hillaa@hotmail.com>
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vinum/vinumio.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c
index 1b9ad98..5bd385f 100644
--- a/sys/dev/vinum/vinumio.c
+++ b/sys/dev/vinum/vinumio.c
@@ -87,6 +87,9 @@ open_drive(struct drive *drive, struct proc *p, int verbose)
else if (bcmp(dname, "amrd", 4) == 0) {
devmajor = 133;
dname += 2;
+ } else if (bcmp(dname, "idad", 4) == 0) {
+ devmajor = 109;
+ dname += 2;
} else
return ENODEV;
dname += 2; /* point past */
@@ -110,14 +113,16 @@ open_drive(struct drive *drive, struct proc *p, int verbose)
if (((dname[1] < '1') || (dname[1] > '4')) /* invalid slice */
||((dname[2] < 'a') || (dname[2] > 'h'))) /* or invalid partition */
return ENODEV;
- devminor = (unit << 3) /* unit */
-+(dname[2] - 'a') /* partition */
- +((dname[1] - '0' + 1) << 16); /* slice */
+ devminor = ((unit & 31) << 3) /* unit */
+ +(dname[2] - 'a') /* partition */
+ +((dname[1] - '0' + 1) << 16) /* slice */
+ +((unit & ~31) << 16); /* high-order unit bits */
} else { /* compatibility partition */
if ((*dname < 'a') || (*dname > 'h')) /* or invalid partition */
return ENODEV;
devminor = (*dname - 'a') /* partition */
- +(unit << 3); /* unit */
+ +((unit & 31) << 3) /* unit */
+ +((unit & ~31) << 16); /* high-order unit bits */
}
drive->dev = makedev(devmajor, devminor); /* find the device */
@@ -406,8 +411,8 @@ check_drive(char *devicename)
if (read_drive_label(drive, 0) == DL_OURS) { /* one of ours */
for (i = 0; i < vinum_conf.drives_allocated; i++) { /* see if the name already exists */
if ((i != driveno) /* not this drive */
-&&(DRIVE[i].state != drive_unallocated) /* and it's allocated */
- &&(strcmp(DRIVE[i].label.name,
+ &&(DRIVE[i].state != drive_unallocated) /* and it's allocated */
+ &&(strcmp(DRIVE[i].label.name,
DRIVE[driveno].label.name) == 0)) { /* and it has the same name */
struct drive *mydrive = &DRIVE[i];
OpenPOWER on IntegriCloud