Module Name: src
Committed By: snj
Date: Sat Sep 26 18:41:42 UTC 2009
Modified Files:
src/sys/arch/alpha/alpha [netbsd-5]: dec_1000a.c dec_2100_a500.c
dec_6600.c dec_kn300.c
Log Message:
Pull up following revision(s) (requested by mhitch in ticket #1010):
sys/arch/alpha/alpha/dec_1000a.c: revision 1.29
sys/arch/alpha/alpha/dec_2100_a500.c: revision 1.19
sys/arch/alpha/alpha/dec_6600.c: revision 1.29
sys/arch/alpha/alpha/dec_kn300.c: revision 1.37
Add support for booting off a couple of common RAID adapters found on
several models of alpha systems: mlx [Mylex DAC060] and iop [I2O].
Addresses PR #25829.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.10.1 src/sys/arch/alpha/alpha/dec_1000a.c
cvs rdiff -u -r1.18 -r1.18.10.1 src/sys/arch/alpha/alpha/dec_2100_a500.c
cvs rdiff -u -r1.26 -r1.26.54.1 src/sys/arch/alpha/alpha/dec_6600.c
cvs rdiff -u -r1.34 -r1.34.54.1 src/sys/arch/alpha/alpha/dec_kn300.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/alpha/dec_1000a.c
diff -u src/sys/arch/alpha/alpha/dec_1000a.c:1.26 src/sys/arch/alpha/alpha/dec_1000a.c:1.26.10.1
--- src/sys/arch/alpha/alpha/dec_1000a.c:1.26 Mon Apr 28 20:23:10 2008
+++ src/sys/arch/alpha/alpha/dec_1000a.c Sat Sep 26 18:41:42 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.26 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.26.10.1 2009/09/26 18:41:42 snj Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.26 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.26.10.1 2009/09/26 18:41:42 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,6 +98,9 @@
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
+#include <dev/ic/mlxio.h>
+#include <dev/ic/mlxvar.h>
+
#include "pckbd.h"
#ifndef CONSPEED
@@ -257,7 +260,8 @@
return;
if (!initted) {
- diskboot = (strcasecmp(b->protocol, "SCSI") == 0);
+ diskboot = (strcasecmp(b->protocol, "SCSI") == 0) ||
+ (strcasecmp(b->protocol, "RAID") == 0);
netboot = (strcasecmp(b->protocol, "BOOTP") == 0) ||
(strcasecmp(b->protocol, "MOP") == 0);
#if 0
@@ -337,4 +341,25 @@
#endif
found = 1;
}
+
+ if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) {
+ /*
+ * Argh! The attach arguments for ld devices is not
+ * consistent, so each supported raid controller requires
+ * different checks.
+ */
+ struct mlx_attach_args *mlxa = aux;
+
+ if (parent != ctrlrdev)
+ return;
+
+ if (b->unit != mlxa->mlxa_unit)
+ return;
+ /* we've found it! */
+ booted_device = dev;
+#if 0
+ printf("\nbooted_device = %s\n", dev->dv_xname);
+#endif
+ found = 1;
+ }
}
Index: src/sys/arch/alpha/alpha/dec_2100_a500.c
diff -u src/sys/arch/alpha/alpha/dec_2100_a500.c:1.18 src/sys/arch/alpha/alpha/dec_2100_a500.c:1.18.10.1
--- src/sys/arch/alpha/alpha/dec_2100_a500.c:1.18 Mon Apr 28 20:23:10 2008
+++ src/sys/arch/alpha/alpha/dec_2100_a500.c Sat Sep 26 18:41:42 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: dec_2100_a500.c,v 1.18.10.1 2009/09/26 18:41:42 snj Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18.10.1 2009/09/26 18:41:42 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -92,6 +92,9 @@
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
+#include <dev/ic/mlxio.h>
+#include <dev/ic/mlxvar.h>
+
#include "pckbd.h"
#ifndef CONSPEED
@@ -243,7 +246,8 @@
return;
if (!initted) {
- diskboot = (strcasecmp(b->protocol, "SCSI") == 0);
+ diskboot = (strcasecmp(b->protocol, "SCSI") == 0) ||
+ (strcasecmp(b->protocol, "RAID") == 0);
netboot = (strcasecmp(b->protocol, "BOOTP") == 0) ||
(strcasecmp(b->protocol, "MOP") == 0);
#if 0
@@ -323,6 +327,27 @@
#endif
found = 1;
}
+
+ if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) {
+ /*
+ * Argh! The attach arguments for ld devices is not
+ * consistent, so each supported raid controller requires
+ * different checks.
+ */
+ struct mlx_attach_args *mlxa = aux;
+
+ if (parent != ctrlrdev)
+ return;
+
+ if (b->unit != mlxa->mlxa_unit)
+ return;
+ /* we've found it! */
+ booted_device = dev;
+#if 0
+ printf("\nbooted_device = %s\n", dev->dv_xname);
+#endif
+ found = 1;
+ }
}
/*
Index: src/sys/arch/alpha/alpha/dec_6600.c
diff -u src/sys/arch/alpha/alpha/dec_6600.c:1.26 src/sys/arch/alpha/alpha/dec_6600.c:1.26.54.1
--- src/sys/arch/alpha/alpha/dec_6600.c:1.26 Sun Mar 4 15:18:10 2007
+++ src/sys/arch/alpha/alpha/dec_6600.c Sat Sep 26 18:41:42 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_6600.c,v 1.26 2007/03/04 15:18:10 yamt Exp $ */
+/* $NetBSD: dec_6600.c,v 1.26.54.1 2009/09/26 18:41:42 snj Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.26 2007/03/04 15:18:10 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.26.54.1 2009/09/26 18:41:42 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,6 +63,13 @@
#include <dev/scsipi/scsiconf.h>
#include <dev/ata/atavar.h>
+#include <dev/ic/mlxio.h>
+#include <dev/ic/mlxvar.h>
+
+#include <dev/i2o/i2o.h>
+#include <dev/i2o/iopio.h>
+#include <dev/i2o/iopvar.h>
+
#include "pckbd.h"
#ifndef CONSPEED
@@ -192,6 +199,8 @@
if (!initted) {
diskboot = (strcasecmp(b->protocol, "SCSI") == 0) ||
+ (strcasecmp(b->protocol, "RAID") == 0) ||
+ (strcasecmp(b->protocol, "I2O") == 0) ||
(strcasecmp(b->protocol, "IDE") == 0);
netboot = (strcasecmp(b->protocol, "BOOTP") == 0) ||
(strcasecmp(b->protocol, "MOP") == 0);
@@ -292,6 +301,44 @@
found = 1;
}
+ if (device_is_a(dev, "ld") && device_is_a(parent, "iop")) {
+ /*
+ * Argh! The attach arguments for ld devices is not
+ * consistent, so each supported raid controller requires
+ * different checks.
+ */
+ struct iop_attach_args *iopa = aux;
+
+ if (parent != ctrlrdev)
+ return;
+
+ if (b->unit != iopa->ia_tid)
+ return;
+ /* we've found it! */
+ booted_device = dev;
+ DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname));
+ found = 1;
+ }
+
+ if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) {
+ /*
+ * Argh! The attach arguments for ld devices is not
+ * consistent, so each supported raid controller requires
+ * different checks.
+ */
+ struct mlx_attach_args *mlxa = aux;
+
+ if (parent != ctrlrdev)
+ return;
+
+ if (b->unit != mlxa->mlxa_unit)
+ return;
+ /* we've found it! */
+ booted_device = dev;
+ DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname));
+ found = 1;
+ }
+
/*
* Support to boot from IDE drives.
*/
Index: src/sys/arch/alpha/alpha/dec_kn300.c
diff -u src/sys/arch/alpha/alpha/dec_kn300.c:1.34 src/sys/arch/alpha/alpha/dec_kn300.c:1.34.54.1
--- src/sys/arch/alpha/alpha/dec_kn300.c:1.34 Sun Mar 4 15:18:10 2007
+++ src/sys/arch/alpha/alpha/dec_kn300.c Sat Sep 26 18:41:42 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $ */
+/* $NetBSD: dec_kn300.c,v 1.34.54.1 2009/09/26 18:41:42 snj Exp $ */
/*
* Copyright (c) 1998 by Matthew Jacob
@@ -34,7 +34,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.34.54.1 2009/09/26 18:41:42 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -72,6 +72,9 @@
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
+#include <dev/ic/mlxio.h>
+#include <dev/ic/mlxvar.h>
+
#include "pckbd.h"
@@ -231,7 +234,8 @@
return;
if (!initted) {
- diskboot = (strcasecmp(b->protocol, "SCSI") == 0);
+ diskboot = (strcasecmp(b->protocol, "SCSI") == 0) ||
+ (strcasecmp(b->protocol, "RAID") == 0);
netboot = (strcasecmp(b->protocol, "BOOTP") == 0) ||
(strcasecmp(b->protocol, "MOP") == 0);
#ifdef BDEBUG
@@ -347,6 +351,27 @@
#endif
found = 1;
}
+
+ if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) {
+ /*
+ * Argh! The attach arguments for ld devices is not
+ * consistent, so each supported raid controller requires
+ * different checks.
+ */
+ struct mlx_attach_args *mlxa = aux;
+
+ if (parent != ctrlrdev)
+ return;
+
+ if (b->unit != mlxa->mlxa_unit)
+ return;
+ /* we've found it! */
+ booted_device = dev;
+#if 0
+ printf("\nbooted_device = %s\n", dev->dv_xname);
+#endif
+ found = 1;
+ }
}