summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-07 08:48:40 +0000
committerjakub <jakub>1999-10-07 08:48:40 +0000
commited3d6df34c9e303e37249527de946c3fe974046b (patch)
tree48a29c6d5e4e93dcf081ebf4fdb6eb890b40b982 /isys
parent1acde06f575984241e7845ca012d506bde14b253 (diff)
downloadanaconda-ed3d6df34c9e303e37249527de946c3fe974046b.tar.gz
anaconda-ed3d6df34c9e303e37249527de946c3fe974046b.tar.xz
anaconda-ed3d6df34c9e303e37249527de946c3fe974046b.zip
UPA addressing is different than we assumed, it gives same addresses
on small boxes but on my E3500 or on E10000 it is different, so fix this. Also, there was a typo which caused wrong addresses of SUNW,pln entries.
Diffstat (limited to 'isys')
-rw-r--r--isys/silo.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/isys/silo.c b/isys/silo.c
index 09082b093..cd3309f9d 100644
--- a/isys/silo.c
+++ b/isys/silo.c
@@ -184,8 +184,21 @@ prom_walk(char *path, int parent, int node, int type) {
sprintf (regstr, "@%x", (reg[0] >> 11) & 0x1f);
} else if (len == 4)
sprintf (regstr, "@%x", reg[0]);
- else
- sprintf (regstr, "@%x,%x", reg[0] >> 4, reg[1]);
+ else {
+ unsigned int regs[2];
+
+ /* Things get more complicated on UPA. If upa-portid exists,
+ then address is @upa-portid,second-int-in-reg, otherwise
+ it is @first-int-in-reg/16,second-int-in-reg (well, probably
+ upa-portid always exists, but just to be safe). */
+ memcpy (regs, reg, sizeof(regs));
+ prop = prom_getproperty("upa-portid", &len);
+ if (prop && len == 4) {
+ reg = (unsigned int *)prop;
+ sprintf (regstr, "@%x,%x", reg[0], regs[1]);
+ } else
+ sprintf (regstr, "@%x,%x", regs[0] >> 4, regs[1]);
+ }
for (nextnode = prom_getchild(parent); nextnode; nextnode = prom_getsibling(nextnode)) {
prop = prom_getproperty("name", &len);
if (prop && len > 0 && !strcmp (path + 1, prop))
@@ -491,7 +504,7 @@ scan_scsi(void) {
sd[disk].prom_node = prom_node;
if (p[1] == 'e') {
sd[disk].type = SDSK_TYPE_PLN;
- sd[disk].lo = (id << 28) | lun;
+ sd[disk].lo = (lun << 28) | id;
} else if (!strcmp (ent->d_name, "fcal"))
sd[disk].type = SDSK_TYPE_FC;
}