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.
This commit is contained in:
mhitch 2009-09-14 02:46:29 +00:00
parent a25d763f88
commit e851d39acd
4 changed files with 133 additions and 11 deletions

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.28 2009/03/14 15:35:59 dsl Exp $");
#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 @@ 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;
}

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Ex
#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 @@ 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;
}

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.28 2009/03/14 15:35:59 dsl Exp $");
#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 @@ 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.
*/

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.36 2009/03/14 15:35:59 dsl Exp $");
#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 @@ 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;
}