diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-07-29 20:22:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-07-29 20:22:08 +0000 |
commit | 22cfd1948d13c4755aa2a0a601a1015f1317d4ec (patch) | |
tree | c1333b1f5c4a4a278cbc20cfd8471e0f96063f3c /sys | |
parent | bcfa5237304d7785cf25f689b86a3251a89ff90e (diff) |
Add support for bootpaths like /pci@1f,4000/ide@3,0/ata@0,0/cmdk@0,0
in addition to paths like /pci@1f,0/ide@d,0/disk@0,0 for machines rooting
off wd(4). This makes the Ultrabook 170/200 find its root disk.
tested by krw@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 428e45c3eaf..6d6a352ee1b 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.67 2007/06/01 19:25:10 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.68 2007/07/29 20:22:07 kettenis Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1118,9 +1118,19 @@ device_register(struct device *dev, void *aux) if (strcmp("wd", devname) == 0) { /* IDE disks. */ struct ata_atapi_attach *aa = aux; + u_int channel, drive; - if ((bp->val[0] / 2) == aa->aa_channel && - (bp->val[0] % 2) == aa->aa_drv_data->drive) { + if (strcmp(bp->name, "ata") == 0 && + bp->val[0] == aa->aa_channel) { + channel = bp->val[0]; bp++; + drive = bp->val[0]; + } else { + channel = bp->val[0] / 2; + drive = bp->val[0] % 2; + } + + if (channel == aa->aa_channel && + drive == aa->aa_drv_data->drive) { nail_bootdev(dev, bp); return; } |