summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2012-06-27 22:40:38 +0000
committermatthew <matthew@openbsd.org>2012-06-27 22:40:38 +0000
commitb4e77cefa0939cd234eee0ec0c1ce5d9ffef4ee7 (patch)
tree78e8622eade62269dc10b2b8c41510a4050c0a3f
parentleftover code re-enqueued the same item on the list multiple times (diff)
downloadwireguard-openbsd-b4e77cefa0939cd234eee0ec0c1ce5d9ffef4ee7.tar.xz
wireguard-openbsd-b4e77cefa0939cd234eee0ec0c1ce5d9ffef4ee7.zip
Change sparc64 to match the "fp" boot device path's parameter based on
the prototype-scsi_link's SDEV_2NDBUS flag rather than against its scsibus field. First, the scsibus field hasn't even been initialized when device_register() is called so it's always 0 anyway; second, the path number is supposed to be locally scoped to a single device whereas the scsibus field is a global scsibus(4) device number. The existing code only happened to work because all of the dual-port fibre-channel adapters we currently support attach as two devices with one scsibus each rather than a single device with two scsibuses, so we would never see anything but "fp@0". Initial investigation and diff by jmatthew after my SCSI cleanups at c2k11 broke sparc64's ability to boot from isp(4); newer version from me based on discussion with krw and kettenis. tested and ok kettenis
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 1fab3995104..fdd48bbcc72 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.114 2011/07/17 22:46:47 matthew Exp $ */
+/* $OpenBSD: autoconf.c,v 1.115 2012/06/27 22:40:38 matthew Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1365,7 +1365,7 @@ device_register(struct device *dev, void *aux)
struct scsi_link *sl = saa->saa_sc_link;
if (strcmp(bp->name, "fp") == 0 &&
- bp->val[0] == sl->scsibus) {
+ bp->val[0] == ((sl->flags & SDEV_2NDBUS) ? 1 : 0)) {
DPRINTF(ACDB_BOOTDEV, ("\t-- matched component %s to %s\n",
bp->name, dev->dv_xname));
bootpath_store(1, bp + 1);