diff options
author | sos <sos@FreeBSD.org> | 2000-10-30 17:11:40 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2000-10-30 17:11:40 +0000 |
commit | 32aa5600750763e560e98e2d369a7c4d6497078b (patch) | |
tree | d7758b502b3a955118a822050c64bc0365a93306 /sys/dev | |
parent | 958b417e33d539be0edd66f69771b1ad704e996e (diff) | |
download | FreeBSD-src-32aa5600750763e560e98e2d369a7c4d6497078b.zip FreeBSD-src-32aa5600750763e560e98e2d369a7c4d6497078b.tar.gz |
Update the Promise RAID code, there are differences between BIOS
version unfortunately...
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-raid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c index 0970e3e..d88d9d6 100644 --- a/sys/dev/ata/ata-raid.c +++ b/sys/dev/ata/ata-raid.c @@ -478,7 +478,7 @@ ar_promise_conf(struct ad_softc *adp, struct ar_config *raidp) } /* now convert Promise config info into our generic form */ - for (i = 0, r = 0; i < 4; i++) { + for (i = 0, r = 0; i < 4 && r < 8; i++) { if ((info.raid[i].flags != PR_F_CONFED) || (((info.raid[i].status & (PR_S_DEFINED|PR_S_ONLINE)) != (PR_S_DEFINED|PR_S_ONLINE)))) { @@ -525,8 +525,8 @@ ar_promise_conf(struct ad_softc *adp, struct ar_config *raidp) /* find out where this disk is in the defined array */ /* first RAID0 / SPAN disks */ for (j = 0; j < info.raid[i].raid0_disks; j++) { - if (info.channel == info.raid[i].disk[j].channel && - info.device == info.raid[i].disk[j].device) { + if (adp->controller->channel == info.raid[i].disk[j].channel && + ATA_DEV(adp->unit) == info.raid[i].disk[j].device) { raid->subdisk[raid->num_subdisks] = adp; raid->num_subdisks++; if (raid->num_subdisks > 1 && !(raid->flags & AR_F_SPAN)) { @@ -538,9 +538,9 @@ ar_promise_conf(struct ad_softc *adp, struct ar_config *raidp) /* if any left they are RAID1 disks eventually in a RADI0+1 config */ for (; j < info.raid[i].total_disks; j++) { - if (info.channel == info.raid[i].disk[j].channel && - info.device == info.raid[i].disk[j].device) { - raid-> mirrordisk[raid->num_mirrordisks] = adp; + if (adp->controller->channel == info.raid[i].disk[j].channel && + ATA_DEV(adp->unit) == info.raid[i].disk[j].device) { + raid->mirrordisk[raid->num_mirrordisks] = adp; raid->num_mirrordisks++; } } |