From 79da6d2ec924cfdf612531607a5ae97264df2270 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 28 Sep 2001 22:20:49 +0000 Subject: Hack to work around bootpaths like: bootpath: /pci@1f,4000/ide@3,0/ata@0,0/cmdk@0,0 The val[0] of ata appears to be the channel number, and cmdk is disk (cmdk@channel,disk) --- sys/arch/sparc64/sparc64/autoconf.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc64') diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 497513fa678..0603e75fb6f 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.12 2001/09/26 20:21:04 jason Exp $ */ +/* $OpenBSD: autoconf.c,v 1.13 2001/09/28 22:20:48 jason Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1455,6 +1455,7 @@ static struct { { "pci", BUSCLASS_PCI, "ppb" }, { "ide", BUSCLASS_PCI, "pciide" }, { "disk", BUSCLASS_NONE, "wd" }, + { "cmdk", BUSCLASS_NONE, "wd" }, { "network", BUSCLASS_NONE, "hme" }, { "SUNW,fas", BUSCLASS_NONE, "esp" }, { "SUNW,hme", BUSCLASS_NONE, "hme" }, @@ -1611,6 +1612,15 @@ device_register(dev, aux) bootpath_store(1, bp + 1); DPRINTF(ACDB_BOOTDEV, ("\t-- found bus controller %s\n", dev->dv_xname)); + if (strcmp(bp->name, "ide") == 0 && + strcmp((bp + 1)->name, "ata") == 0 && + strcmp((bp + 2)->name, "cmdk") == 0) { + if (((bp + 2)->val[0] == (bp + 1)->val[0]) && + ((bp + 1)->val[1] == 0)) { + (bp + 1)->dev = dev; + bootpath_store(1, bp + 2); + } + } return; } } else if (strcmp(dvname, "le") == 0 || -- cgit v1.2.3