summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-09-04 18:25:32 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-09-04 18:25:32 +0000
commit6fbc19ea0da71c485eb0d3cced82c6feda50c7a3 (patch)
tree6ca86eebd7c163ac399989e3ebd1d910b078bfba /sys/arch
parent2360cd39cec010264dfd27c3b15f00c67571567c (diff)
Correctly decode the IDE channel/drive number when matching devices
(booting from master or slave on either channel should work now).
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index de4c6d97c35..44f9b36072d 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.25 2002/06/15 17:23:31 art Exp $ */
+/* $OpenBSD: autoconf.c,v 1.26 2002/09/04 18:25:31 jason Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1631,7 +1631,8 @@ device_register(dev, aux)
/* IDE disks. */
struct ata_atapi_attach *aa = aux;
- if (aa->aa_channel == bp->val[0]) {
+ if ((bp->val[0] / 2) == aa->aa_channel &&
+ (bp->val[0] % 2) == aa->aa_drv_data->drive) {
nail_bootdev(dev, bp);
DPRINTF(ACDB_BOOTDEV, ("\t-- found wd disk %s\n",
dev->dv_xname));