Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/sgimips Fix boot device detection in the fa...
details: https://anonhg.NetBSD.org/src/rev/2723b3c9c7af
branches: trunk
changeset: 534072:2723b3c9c7af
user: rafal <rafal%NetBSD.org@localhost>
date: Mon Jul 15 04:38:59 2002 +0000
description:
Fix boot device detection in the face of multiple SCSI controllers. This
isn't perfect (the NetBSD device units must match ARCS device numbers), but
it's better than randomly matching one of the devices. Fixes PR 16584 from
Scott G. Taylor.
diffstat:
sys/arch/sgimips/sgimips/autoconf.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 333920d3a44a -r 2723b3c9c7af sys/arch/sgimips/sgimips/autoconf.c
--- a/sys/arch/sgimips/sgimips/autoconf.c Mon Jul 15 00:19:54 2002 +0000
+++ b/sys/arch/sgimips/sgimips/autoconf.c Mon Jul 15 04:38:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.8 2002/03/13 13:12:29 simonb Exp $ */
+/* $NetBSD: autoconf.c,v 1.9 2002/07/15 04:38:59 rafal Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -50,7 +50,7 @@
#include <dev/scsipi/scsiconf.h>
struct device *booted_device = NULL;
-static struct device *booted_controller;
+static struct device *booted_controller = NULL;
static int booted_slot, booted_unit, booted_partition;
static char *booted_protocol = NULL;
@@ -177,8 +177,12 @@
* Check for WDC controller
*/
if (scsiboot && strcmp(cd->cd_name, "wdsc") == 0) {
- /* XXX Check controller number == booted_slot */
- booted_controller = dev;
+ /*
+ * XXX: this fails if the controllers were attached
+ * in an order other than the ARCS-imposed order.
+ */
+ if (dev->dv_unit == booted_slot)
+ booted_controller = dev;
return;
}
Home |
Main Index |
Thread Index |
Old Index