Use device_is_a().
This commit is contained in:
parent
330d630ab9
commit
a1050c527b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: api_up1000.c,v 1.19 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: api_up1000.c,v 1.20 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.19 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.20 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -178,8 +178,6 @@ api_up1000_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -194,7 +192,7 @@ api_up1000_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -236,7 +234,9 @@ api_up1000_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
@ -259,10 +259,10 @@ api_up1000_device_register(dev, aux)
|
|||
/*
|
||||
* Support to boot from IDE drives.
|
||||
*/
|
||||
if (!strcmp(name, "wd")) {
|
||||
if (device_is_a(dev, "wd")) {
|
||||
struct ata_device *adev = aux;
|
||||
|
||||
if (strcmp("atabus", parent->dv_cfdata->cf_name))
|
||||
if (!device_is_a(parent, "atabus"))
|
||||
return;
|
||||
if (device_parent(parent) != ctrlrdev)
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: avalon_a12.c,v 1.12 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: avalon_a12.c,v 1.13 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/* [Notice revision 2.2]
|
||||
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
|
||||
|
@ -64,7 +64,7 @@
|
|||
#include "opt_avalon_a12.h" /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: avalon_a12.c,v 1.12 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: avalon_a12.c,v 1.13 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -154,8 +154,6 @@ avalon_a12_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -171,7 +169,7 @@ avalon_a12_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -218,7 +216,9 @@ avalon_a12_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_1000a.c,v 1.22 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_1000a.c,v 1.23 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.22 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.23 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -259,8 +259,6 @@ dec_1000a_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -276,7 +274,7 @@ dec_1000a_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -323,7 +321,9 @@ dec_1000a_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_2000_300.c,v 1.10 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_2000_300.c,v 1.11 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2000_300.c,v 1.10 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2000_300.c,v 1.11 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -209,8 +209,6 @@ dec_2000_300_device_register(struct device *dev, void *aux)
|
|||
static struct device *eisadev, *isadev, *scsidev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -224,10 +222,10 @@ dec_2000_300_device_register(struct device *dev, void *aux)
|
|||
initted = 1;
|
||||
}
|
||||
|
||||
if (eisadev == NULL && strcmp(name, "eisa") == 0)
|
||||
if (eisadev == NULL && device_is_a(dev, "eisa"))
|
||||
eisadev = dev;
|
||||
|
||||
if (isadev == NULL && strcmp(name, "isa") == 0)
|
||||
if (isadev == NULL && device_is_a(dev, "isa"))
|
||||
isadev = dev;
|
||||
|
||||
if (scsiboot && (scsidev == NULL)) {
|
||||
|
@ -248,9 +246,9 @@ dec_2000_300_device_register(struct device *dev, void *aux)
|
|||
}
|
||||
|
||||
if (scsiboot &&
|
||||
(!strcmp(name, "sd") ||
|
||||
!strcmp(name, "st") ||
|
||||
!strcmp(name, "cd"))) {
|
||||
(device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd"))) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
|
||||
if (device_parent(parent) != scsidev)
|
||||
|
@ -263,12 +261,12 @@ dec_2000_300_device_register(struct device *dev, void *aux)
|
|||
|
||||
switch (b->boot_dev_type) {
|
||||
case 0:
|
||||
if (strcmp(name, "sd") &&
|
||||
strcmp(name, "cd"))
|
||||
if (!device_is_a(dev, "sd") &&
|
||||
!device_is_a(dev, "cd"))
|
||||
return;
|
||||
break;
|
||||
case 1:
|
||||
if (strcmp(name, "st"))
|
||||
if (!device_is_a(dev, "st"))
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_2100_a50.c,v 1.58 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_2100_a50.c,v 1.59 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.58 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.59 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -202,8 +202,6 @@ dec_2100_a50_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -219,7 +217,7 @@ dec_2100_a50_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -266,7 +264,9 @@ dec_2100_a50_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_2100_a500.c,v 1.13 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_2100_a500.c,v 1.14 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.13 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.14 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -245,8 +245,6 @@ dec_2100_a500_device_register(struct device *dev, void *aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -261,7 +259,7 @@ dec_2100_a500_device_register(struct device *dev, void *aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -308,7 +306,9 @@ dec_2100_a500_device_register(struct device *dev, void *aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_3000_300.c,v 1.40 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_3000_300.c,v 1.41 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.40 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.41 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -152,8 +152,6 @@ dec_3000_300_device_register(dev, aux)
|
|||
static struct device *tcdsdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -174,7 +172,7 @@ dec_3000_300_device_register(dev, aux)
|
|||
* as the right channel. then we find the actual scsi
|
||||
* device we came from. note: no SCSI LUN support (yet).
|
||||
*/
|
||||
if (scsiboot && (strcmp(name, "tcds") == 0)) {
|
||||
if (scsiboot && device_is_a(dev, "tcds")) {
|
||||
struct tc_attach_args *tcargs = aux;
|
||||
|
||||
if (b->slot != tcargs->ta_slot)
|
||||
|
@ -186,7 +184,7 @@ dec_3000_300_device_register(dev, aux)
|
|||
#endif
|
||||
}
|
||||
if (scsiboot && tcdsdev &&
|
||||
(strcmp(name, "asc") == 0)) {
|
||||
device_is_a(dev, "asc")) {
|
||||
struct tcdsdev_attach_args *ta = aux;
|
||||
|
||||
if (parent != (struct device *)tcdsdev)
|
||||
|
@ -202,9 +200,9 @@ dec_3000_300_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (scsiboot && scsidev &&
|
||||
(strcmp(name, "sd") == 0 ||
|
||||
strcmp(name, "st") == 0 ||
|
||||
strcmp(name, "cd") == 0)) {
|
||||
(device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd"))) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
|
||||
if (device_parent(parent) != scsidev)
|
||||
|
@ -217,12 +215,12 @@ dec_3000_300_device_register(dev, aux)
|
|||
|
||||
switch (b->boot_dev_type) {
|
||||
case 0:
|
||||
if (strcmp(name, "sd") &&
|
||||
strcmp(name, "cd"))
|
||||
if (!device_is_a(dev, "sd") &&
|
||||
!device_is_a(dev, "cd"))
|
||||
return;
|
||||
break;
|
||||
case 1:
|
||||
if (strcmp(name, "st"))
|
||||
if (!device_is_a(dev, "st"))
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
|
@ -238,9 +236,8 @@ dec_3000_300_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (netboot) {
|
||||
if (b->slot == 5 && strcmp(name, "le") == 0 &&
|
||||
strcmp(parent->dv_cfdata->cf_name, "ioasic")
|
||||
== 0) {
|
||||
if (b->slot == 5 && device_is_a(dev, "le") &&
|
||||
device_is_a(parent, "ioasic")) {
|
||||
/*
|
||||
* no need to check ioasic_attach_args, since only
|
||||
* one le on ioasic.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_3000_500.c,v 1.39 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_3000_500.c,v 1.40 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.39 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.40 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -172,8 +172,6 @@ dec_3000_500_device_register(dev, aux)
|
|||
static struct device *tcdsdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -194,7 +192,7 @@ dec_3000_500_device_register(dev, aux)
|
|||
* as the right channel. then we find the actual scsi
|
||||
* device we came from. note: no SCSI LUN support (yet).
|
||||
*/
|
||||
if (scsiboot && (strcmp(name, "tcds") == 0)) {
|
||||
if (scsiboot && device_is_a(dev, "tcds")) {
|
||||
struct tc_attach_args *tcargs = aux;
|
||||
|
||||
if (b->slot != tcargs->ta_slot)
|
||||
|
@ -206,7 +204,7 @@ dec_3000_500_device_register(dev, aux)
|
|||
#endif
|
||||
}
|
||||
if (scsiboot && tcdsdev &&
|
||||
(strcmp(name, "asc") == 0)) {
|
||||
device_is_a(dev, "asc")) {
|
||||
struct tcdsdev_attach_args *ta = aux;
|
||||
|
||||
if (parent != (struct device *)tcdsdev)
|
||||
|
@ -222,9 +220,9 @@ dec_3000_500_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (scsiboot && scsidev &&
|
||||
(strcmp(name, "sd") == 0 ||
|
||||
strcmp(name, "st") == 0 ||
|
||||
strcmp(name, "cd") == 0)) {
|
||||
(device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd"))) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
|
||||
if (device_parent(parent) != scsidev)
|
||||
|
@ -237,12 +235,12 @@ dec_3000_500_device_register(dev, aux)
|
|||
|
||||
switch (b->boot_dev_type) {
|
||||
case 0:
|
||||
if (strcmp(name, "sd") &&
|
||||
strcmp(name, "cd"))
|
||||
if (!device_is_a(dev, "sd") &&
|
||||
!device_is_a(dev, "cd"))
|
||||
return;
|
||||
break;
|
||||
case 1:
|
||||
if (strcmp(name, "st"))
|
||||
if (!device_is_a(dev, "st"))
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
|
@ -258,9 +256,8 @@ dec_3000_500_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (netboot) {
|
||||
if (b->slot == 7 && strcmp(name, "le") == 0 &&
|
||||
strcmp(parent->dv_cfdata->cf_name, "ioasic")
|
||||
== 0) {
|
||||
if (b->slot == 7 && device_is_a(dev, "le") &&
|
||||
device_is_a(parent, "ioasic")) {
|
||||
/*
|
||||
* no need to check ioasic_attach_args, since only
|
||||
* one le on ioasic.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_550.c,v 1.27 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_550.c,v 1.28 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_550.c,v 1.27 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_550.c,v 1.28 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -189,8 +189,6 @@ dec_550_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -206,7 +204,7 @@ dec_550_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -249,7 +247,9 @@ dec_550_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
@ -272,10 +272,10 @@ dec_550_device_register(dev, aux)
|
|||
/*
|
||||
* Support to boot from IDE drives.
|
||||
*/
|
||||
if (!strcmp(name, "wd")) {
|
||||
if (device_is_a(dev, "wd")) {
|
||||
struct ata_device *adev = aux;
|
||||
|
||||
if (strcmp("atabus", parent->dv_cfdata->cf_name))
|
||||
if (!device_is_a(parent, "atabus"))
|
||||
return;
|
||||
if (device_parent(parent) != ctrlrdev)
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_6600.c,v 1.23 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_6600.c,v 1.24 2006/02/25 17:32:43 thorpej 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.23 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.24 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -186,8 +186,6 @@ dec_6600_device_register(dev, aux)
|
|||
static struct device *primarydev, *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -203,7 +201,7 @@ dec_6600_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (primarydev == NULL) {
|
||||
if (strcmp(name, "tsp"))
|
||||
if (!device_is_a(dev, "tsp"))
|
||||
return;
|
||||
else {
|
||||
struct tsp_attach_args *tsp = aux;
|
||||
|
@ -218,7 +216,7 @@ dec_6600_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
/*
|
||||
* Try to find primarydev anywhere in the ancestry. This is
|
||||
|
@ -272,7 +270,9 @@ dec_6600_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
@ -295,10 +295,10 @@ dec_6600_device_register(dev, aux)
|
|||
/*
|
||||
* Support to boot from IDE drives.
|
||||
*/
|
||||
if (!strcmp(name, "wd")) {
|
||||
if (device_is_a(dev, "wd")) {
|
||||
struct ata_device *adev = aux;
|
||||
|
||||
if (strcmp("atabus", parent->dv_cfdata->cf_name))
|
||||
if (!device_is_a(parent, "atabus"))
|
||||
return;
|
||||
if (device_parent(parent) != ctrlrdev)
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_alphabook1.c,v 1.18 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_alphabook1.c,v 1.19 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_alphabook1.c,v 1.18 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_alphabook1.c,v 1.19 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -182,8 +182,6 @@ dec_alphabook1_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -199,7 +197,7 @@ dec_alphabook1_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -246,7 +244,9 @@ dec_alphabook1_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_axppci_33.c,v 1.58 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_axppci_33.c,v 1.59 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.58 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.59 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -236,8 +236,6 @@ dec_axppci_33_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -253,7 +251,7 @@ dec_axppci_33_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -300,7 +298,9 @@ dec_axppci_33_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_eb164.c,v 1.52 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_eb164.c,v 1.53 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.52 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.53 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -184,8 +184,6 @@ dec_eb164_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -201,7 +199,7 @@ dec_eb164_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -244,7 +242,9 @@ dec_eb164_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
@ -267,10 +267,10 @@ dec_eb164_device_register(dev, aux)
|
|||
/*
|
||||
* Support to boot from IDE drives.
|
||||
*/
|
||||
if (!strcmp(name, "wd")) {
|
||||
if (device_is_a(dev, "wd")) {
|
||||
struct ata_device *adev = aux;
|
||||
|
||||
if (strcmp("atabus", parent->dv_cfdata->cf_name))
|
||||
if (!device_is_a(parent, "atabus"))
|
||||
return;
|
||||
if (device_parent(parent) != ctrlrdev)
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_eb64plus.c,v 1.33 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_eb64plus.c,v 1.34 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.33 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.34 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -192,8 +192,6 @@ dec_eb64plus_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -209,7 +207,7 @@ dec_eb64plus_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -256,7 +254,9 @@ dec_eb64plus_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_eb66.c,v 1.19 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_eb66.c,v 1.20 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb66.c,v 1.19 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb66.c,v 1.20 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -189,8 +189,6 @@ dec_eb66_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -206,7 +204,7 @@ dec_eb66_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -253,7 +251,9 @@ dec_eb66_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_kn20aa.c,v 1.56 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_kn20aa.c,v 1.57 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.56 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.57 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -191,8 +191,6 @@ dec_kn20aa_device_register(dev, aux)
|
|||
static struct device *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -208,7 +206,7 @@ dec_kn20aa_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
else {
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
@ -255,7 +253,9 @@ dec_kn20aa_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_kn300.c,v 1.31 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_kn300.c,v 1.32 2006/02/25 17:32:43 thorpej 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.31 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.32 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -226,8 +226,6 @@ dec_kn300_device_register(dev, aux)
|
|||
static struct device *primarydev, *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -252,7 +250,7 @@ dec_kn300_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (primarydev == NULL) {
|
||||
if (strcmp(name, "mcpcia"))
|
||||
if (!device_is_a(dev, "mcpcia"))
|
||||
return;
|
||||
else {
|
||||
struct mcbus_dev_attach_args *ma = aux;
|
||||
|
@ -268,7 +266,7 @@ dec_kn300_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
/*
|
||||
* Try to find primarydev anywhere in the ancestry. This is
|
||||
|
@ -326,7 +324,9 @@ dec_kn300_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_kn8ae.c,v 1.34 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: dec_kn8ae.c,v 1.35 2006/02/25 17:32:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 by Matthew Jacob
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.34 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.35 2006/02/25 17:32:43 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -124,8 +124,6 @@ dec_kn8ae_device_register(dev, aux)
|
|||
static struct device *primarydev, *pcidev, *ctrlrdev;
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
@ -150,7 +148,7 @@ dec_kn8ae_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (primarydev == NULL) {
|
||||
if (strcmp(name, "dwlpx"))
|
||||
if (!device_is_a(dev, "dwlpx"))
|
||||
return;
|
||||
else {
|
||||
struct kft_dev_attach_args *ka = aux;
|
||||
|
@ -166,7 +164,7 @@ dec_kn8ae_device_register(dev, aux)
|
|||
}
|
||||
|
||||
if (pcidev == NULL) {
|
||||
if (strcmp(name, "pci"))
|
||||
if (!device_is_a(dev, "pci"))
|
||||
return;
|
||||
/*
|
||||
* Try to find primarydev anywhere in the ancestry. This is
|
||||
|
@ -224,7 +222,9 @@ dec_kn8ae_device_register(dev, aux)
|
|||
if (!diskboot)
|
||||
return;
|
||||
|
||||
if (!strcmp(name, "sd") || !strcmp(name, "st") || !strcmp(name, "cd")) {
|
||||
if (device_is_a(dev, "sd") ||
|
||||
device_is_a(dev, "st") ||
|
||||
device_is_a(dev, "cd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
struct scsipi_periph *periph = sa->sa_periph;
|
||||
int unit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.27 2006/02/23 05:37:46 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.28 2006/02/25 17:37:14 thorpej Exp $ */
|
||||
/* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -88,7 +88,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 2006/02/23 05:37:46 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.28 2006/02/25 17:37:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -251,8 +251,6 @@ device_register(struct device *dev, void *aux)
|
|||
{
|
||||
struct bootdev_data *b = bootdev_data;
|
||||
struct device *parent = device_parent(dev);
|
||||
struct cfdata *cf = dev->dv_cfdata;
|
||||
const char *name = cf->cf_name;
|
||||
|
||||
static int found = 0, initted = 0, scsiboot = 0;
|
||||
static struct device *scsibusdev = NULL;
|
||||
|
@ -268,7 +266,8 @@ device_register(struct device *dev, void *aux)
|
|||
initted = 1;
|
||||
}
|
||||
|
||||
if (scsiboot && strcmp(name, "scsibus") == 0) {
|
||||
if (scsiboot && device_is_a(dev, "scsibus")) {
|
||||
/* XXX dv_unit abuse */
|
||||
if (dev->dv_unit == b->bus) {
|
||||
scsibusdev = dev;
|
||||
#if 0
|
||||
|
@ -278,10 +277,10 @@ device_register(struct device *dev, void *aux)
|
|||
return;
|
||||
}
|
||||
|
||||
if (strcmp(b->dev_type, name) != 0)
|
||||
if (!device_is_a(dev, b->dev_type))
|
||||
return;
|
||||
|
||||
if (strcmp(name, "sd") == 0) {
|
||||
if (device_is_a(dev, "sd")) {
|
||||
struct scsipibus_attach_args *sa = aux;
|
||||
|
||||
if (scsiboot && scsibusdev && parent == scsibusdev &&
|
||||
|
@ -294,6 +293,7 @@ device_register(struct device *dev, void *aux)
|
|||
}
|
||||
return;
|
||||
}
|
||||
/* XXX dv_unit abuse */
|
||||
if (dev->dv_unit == b->unit) {
|
||||
booted_device = dev;
|
||||
#if 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: spkr.c,v 1.14 2005/12/11 12:17:04 christos Exp $ */
|
||||
/* $NetBSD: spkr.c,v 1.15 2006/02/25 17:37:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* spkr.c -- device driver for console speaker on 80386
|
||||
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.14 2005/12/11 12:17:04 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.15 2006/02/25 17:37:14 thorpej Exp $");
|
||||
|
||||
#include "spkr.h"
|
||||
#if NSPKR > 0
|
||||
|
@ -428,8 +428,7 @@ spkrprobe (parent, match, aux)
|
|||
* the console drivers. (We really wish we could be the
|
||||
* child of a real keyboard controller driver.)
|
||||
*/
|
||||
if ((parent == NULL) ||
|
||||
(strcmp(parent->dv_cfdata->cf_name, "pc") != 0))
|
||||
if (parent == NULL || !device_is_a(parent, "pc"))
|
||||
return (0);
|
||||
if (match->cf_loc[PCKBDCF_PORT] != PITAUX_PORT)
|
||||
return (0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.15 2006/02/21 04:32:38 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.16 2006/02/25 17:37:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.15 2006/02/21 04:32:38 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2006/02/25 17:37:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -81,8 +81,7 @@ device_register(dev, aux)
|
|||
booted_device = dev;
|
||||
|
||||
if ((booted_device == NULL) && (netboot == 0)) {
|
||||
if (device_class(dev) == DV_DISK &&
|
||||
!strcmp(dev->dv_cfdata->cf_name, "wd")) {
|
||||
if (device_class(dev) == DV_DISK && device_is_a(dev, "wd")) {
|
||||
hd_iterate++;
|
||||
if (hd_iterate == bootunit) {
|
||||
booted_device = dev;
|
||||
|
|
Loading…
Reference in New Issue