summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2007-07-29 20:22:07 +0000
committerkettenis <kettenis@openbsd.org>2007-07-29 20:22:07 +0000
commite34882ce3787929b808c96e7b2f5ec656a443202 (patch)
tree4bdc24efd93883d9d1f0bf297306b6dd2f441835
parentSeperate members of "struct pcb" that are accessed using physical addresses (diff)
downloadwireguard-openbsd-e34882ce3787929b808c96e7b2f5ec656a443202.tar.xz
wireguard-openbsd-e34882ce3787929b808c96e7b2f5ec656a443202.zip
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@
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c16
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;
}