diff --git a/sys/arch/alpha/alpha/dec_1000a.c b/sys/arch/alpha/alpha/dec_1000a.c index b18ac5d43ae5..502a2548817f 100644 --- a/sys/arch/alpha/alpha/dec_1000a.c +++ b/sys/arch/alpha/alpha/dec_1000a.c @@ -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 /* 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 #include @@ -98,6 +98,9 @@ __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.28 2009/03/14 15:35:59 dsl Exp $"); #include #include +#include +#include + #include "pckbd.h" #ifndef CONSPEED @@ -255,7 +258,8 @@ dec_1000a_device_register(struct device *dev, void *aux) 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 @@ -332,6 +336,27 @@ dec_1000a_device_register(struct device *dev, void *aux) booted_device = dev; #if 0 printf("\nbooted_device = %s\n", dev->dv_xname); +#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 --git a/sys/arch/alpha/alpha/dec_2100_a500.c b/sys/arch/alpha/alpha/dec_2100_a500.c index 2aa82f040d05..151dc52de345 100644 --- a/sys/arch/alpha/alpha/dec_2100_a500.c +++ b/sys/arch/alpha/alpha/dec_2100_a500.c @@ -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 /* 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 #include @@ -92,6 +92,9 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Ex #include #include +#include +#include + #include "pckbd.h" #ifndef CONSPEED @@ -243,7 +246,8 @@ dec_2100_a500_device_register(struct device *dev, void *aux) 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 @@ -320,6 +324,27 @@ dec_2100_a500_device_register(struct device *dev, void *aux) booted_device = dev; #if 0 printf("\nbooted_device = %s\n", dev->dv_xname); +#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 --git a/sys/arch/alpha/alpha/dec_6600.c b/sys/arch/alpha/alpha/dec_6600.c index 54d2625564ec..e26bf73be8b3 100644 --- a/sys/arch/alpha/alpha/dec_6600.c +++ b/sys/arch/alpha/alpha/dec_6600.c @@ -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 /* 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 #include @@ -63,6 +63,13 @@ __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.28 2009/03/14 15:35:59 dsl Exp $"); #include #include +#include +#include + +#include +#include +#include + #include "pckbd.h" #ifndef CONSPEED @@ -190,6 +197,8 @@ dec_6600_device_register(struct device *dev, void *aux) 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 @@ dec_6600_device_register(struct device *dev, void *aux) 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 --git a/sys/arch/alpha/alpha/dec_kn300.c b/sys/arch/alpha/alpha/dec_kn300.c index 2a2f895838ad..b2c7298adf10 100644 --- a/sys/arch/alpha/alpha/dec_kn300.c +++ b/sys/arch/alpha/alpha/dec_kn300.c @@ -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 /* 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 #include @@ -72,6 +72,9 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.36 2009/03/14 15:35:59 dsl Exp $"); #include #include +#include +#include + #include "pckbd.h" @@ -229,7 +232,8 @@ dec_kn300_device_register(struct device *dev, void *aux) 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 @@ -342,6 +346,27 @@ dec_kn300_device_register(struct device *dev, void *aux) booted_device = dev; #ifdef BDEBUG printf("\nbooted_device = %s\n", dev->dv_xname); +#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; }