Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Add support for booting off a couple of...
details: https://anonhg.NetBSD.org/src/rev/5edcef0f2837
branches: trunk
changeset: 747412:5edcef0f2837
user: mhitch <mhitch%NetBSD.org@localhost>
date: Mon Sep 14 02:46:29 2009 +0000
description:
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.
diffstat:
sys/arch/alpha/alpha/dec_1000a.c | 31 +++++++++++++++++++--
sys/arch/alpha/alpha/dec_2100_a500.c | 31 +++++++++++++++++++--
sys/arch/alpha/alpha/dec_6600.c | 51 ++++++++++++++++++++++++++++++++++-
sys/arch/alpha/alpha/dec_kn300.c | 31 +++++++++++++++++++--
4 files changed, 133 insertions(+), 11 deletions(-)
diffs (282 lines):
diff -r 40f3f99c5f1f -r 5edcef0f2837 sys/arch/alpha/alpha/dec_1000a.c
--- a/sys/arch/alpha/alpha/dec_1000a.c Mon Sep 14 02:28:22 2009 +0000
+++ b/sys/arch/alpha/alpha/dec_1000a.c Mon Sep 14 02:46:29 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.28 2009/03/14 15:35:59 dsl Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.29 2009/09/14 02:46:29 mhitch 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.28 2009/03/14 15:35:59 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.29 2009/09/14 02:46:29 mhitch 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
@@ -255,7 +258,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
@@ -335,4 +339,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;
+ }
}
diff -r 40f3f99c5f1f -r 5edcef0f2837 sys/arch/alpha/alpha/dec_2100_a500.c
--- a/sys/arch/alpha/alpha/dec_2100_a500.c Mon Sep 14 02:28:22 2009 +0000
+++ b/sys/arch/alpha/alpha/dec_2100_a500.c Mon Sep 14 02:46:29 2009 +0000
@@ -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.19 2009/09/14 02:46:29 mhitch 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.19 2009/09/14 02:46:29 mhitch 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;
+ }
}
/*
diff -r 40f3f99c5f1f -r 5edcef0f2837 sys/arch/alpha/alpha/dec_6600.c
--- a/sys/arch/alpha/alpha/dec_6600.c Mon Sep 14 02:28:22 2009 +0000
+++ b/sys/arch/alpha/alpha/dec_6600.c Mon Sep 14 02:46:29 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_6600.c,v 1.28 2009/03/14 15:35:59 dsl Exp $ */
+/* $NetBSD: dec_6600.c,v 1.29 2009/09/14 02:46:29 mhitch 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.28 2009/03/14 15:35:59 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.29 2009/09/14 02:46:29 mhitch 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
@@ -190,6 +197,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);
@@ -290,6 +299,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.
*/
diff -r 40f3f99c5f1f -r 5edcef0f2837 sys/arch/alpha/alpha/dec_kn300.c
--- a/sys/arch/alpha/alpha/dec_kn300.c Mon Sep 14 02:28:22 2009 +0000
+++ b/sys/arch/alpha/alpha/dec_kn300.c Mon Sep 14 02:46:29 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_kn300.c,v 1.36 2009/03/14 15:35:59 dsl Exp $ */
+/* $NetBSD: dec_kn300.c,v 1.37 2009/09/14 02:46:29 mhitch 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.36 2009/03/14 15:35:59 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.37 2009/09/14 02:46:29 mhitch 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"
@@ -229,7 +232,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
@@ -345,6 +349,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;
+ }
}
Home |
Main Index |
Thread Index |
Old Index