kill a number of autoconf submatch functions which follow the
standard scheme: if (<configured> != <wildcard> && <configured> != <real>) then fail else ask device match function This is handled by config_stdsubmatch() now.
This commit is contained in:
parent
90c378642f
commit
e6a178f21f
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: pnpbios.c,v 1.50 2005/08/25 18:35:38 drochner Exp $ */
|
/* $NetBSD: pnpbios.c,v 1.51 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Jason R. Thorpe. All rights reserved.
|
* Copyright (c) 2000 Jason R. Thorpe. All rights reserved.
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.50 2005/08/25 18:35:38 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.51 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -140,8 +140,6 @@ static int pnpbios_attachnode(struct pnpbios_softc *,
|
||||||
|
|
||||||
static int pnp_scan(const u_int8_t **, size_t,
|
static int pnp_scan(const u_int8_t **, size_t,
|
||||||
struct pnpresources *, int);
|
struct pnpresources *, int);
|
||||||
static int pnpbios_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
extern int pnpbioscall(int);
|
extern int pnpbioscall(int);
|
||||||
|
|
||||||
static void pnpbios_enumerate(struct pnpbios_softc *);
|
static void pnpbios_enumerate(struct pnpbios_softc *);
|
||||||
|
@ -766,18 +764,6 @@ pnpbios_print_devres(struct device *dev, struct pnpbiosdev_attach_args *aa)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
pnpbios_submatch(struct device *parent, struct cfdata *match,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (match->cf_loc[PNPBIOSCF_INDEX] != PNPBIOSCF_INDEX_DEFAULT &&
|
|
||||||
match->cf_loc[PNPBIOSCF_INDEX] != locs[PNPBIOSCF_INDEX])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, match, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pnpbios_attachchild(struct pnpbios_softc *sc,
|
pnpbios_attachchild(struct pnpbios_softc *sc,
|
||||||
struct pnpbiosdev_attach_args *aa, int matchonly)
|
struct pnpbiosdev_attach_args *aa, int matchonly)
|
||||||
|
@ -787,11 +773,11 @@ pnpbios_attachchild(struct pnpbios_softc *sc,
|
||||||
locs[PNPBIOSCF_INDEX] = aa->idx;
|
locs[PNPBIOSCF_INDEX] = aa->idx;
|
||||||
|
|
||||||
if (matchonly)
|
if (matchonly)
|
||||||
return (config_search_loc(pnpbios_submatch, (struct device *)sc,
|
return (config_search_loc(config_stdsubmatch, (struct device *)sc,
|
||||||
"pnpbios", locs, aa) != NULL);
|
"pnpbios", locs, aa) != NULL);
|
||||||
else
|
else
|
||||||
return (config_found_sm_loc((struct device *)sc, "pnpbios",
|
return (config_found_sm_loc((struct device *)sc, "pnpbios",
|
||||||
locs, aa, pnpbios_print, pnpbios_submatch)
|
locs, aa, pnpbios_print, config_stdsubmatch)
|
||||||
!= NULL);
|
!= NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ata_raid.c,v 1.15 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: ata_raid.c,v 1.16 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.15 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.16 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/buf.h>
|
#include <sys/buf.h>
|
||||||
|
@ -76,9 +76,6 @@ static int ataraid_match(struct device *, struct cfdata *, void *);
|
||||||
static void ataraid_attach(struct device *, struct device *, void *);
|
static void ataraid_attach(struct device *, struct device *, void *);
|
||||||
static int ataraid_print(void *, const char *);
|
static int ataraid_print(void *, const char *);
|
||||||
|
|
||||||
static int ataraid_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
static int ata_raid_finalize(struct device *);
|
static int ata_raid_finalize(struct device *);
|
||||||
|
|
||||||
ataraid_array_info_list_t ataraid_array_info_list =
|
ataraid_array_info_list_t ataraid_array_info_list =
|
||||||
|
@ -206,7 +203,7 @@ ataraid_attach(struct device *parent, struct device *self, void *aux)
|
||||||
locs[ATARAIDCF_UNIT] = aai->aai_arrayno;
|
locs[ATARAIDCF_UNIT] = aai->aai_arrayno;
|
||||||
|
|
||||||
config_found_sm_loc(self, "ataraid", locs, aai,
|
config_found_sm_loc(self, "ataraid", locs, aai,
|
||||||
ataraid_print, ataraid_submatch);
|
ataraid_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,27 +223,6 @@ ataraid_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ataraid_submatch:
|
|
||||||
*
|
|
||||||
* Submatch routine for ATA RAID logical disks.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
ataraid_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[ATARAIDCF_VENDTYPE] != ATARAIDCF_VENDTYPE_DEFAULT &&
|
|
||||||
cf->cf_loc[ATARAIDCF_VENDTYPE] != locs[ATARAIDCF_VENDTYPE])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
if (cf->cf_loc[ATARAIDCF_UNIT] != ATARAIDCF_UNIT_DEFAULT &&
|
|
||||||
cf->cf_loc[ATARAIDCF_UNIT] != locs[ATARAIDCF_UNIT])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ata_raid_check_component:
|
* ata_raid_check_component:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: cardbus.c,v 1.62 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: cardbus.c,v 1.63 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998, 1999 and 2000
|
* Copyright (c) 1997, 1998, 1999 and 2000
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.62 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.63 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_cardbus.h"
|
#include "opt_cardbus.h"
|
||||||
|
|
||||||
|
@ -73,8 +73,6 @@ STATIC void cardbusattach(struct device *, struct device *, void *);
|
||||||
STATIC int cardbusmatch(struct device *, struct cfdata *, void *);
|
STATIC int cardbusmatch(struct device *, struct cfdata *, void *);
|
||||||
int cardbus_rescan(struct device *, const char *, const int *);
|
int cardbus_rescan(struct device *, const char *, const int *);
|
||||||
void cardbus_childdetached(struct device *, struct device *);
|
void cardbus_childdetached(struct device *, struct device *);
|
||||||
static int cardbussubmatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
static int cardbusprint(void *, const char *);
|
static int cardbusprint(void *, const char *);
|
||||||
|
|
||||||
typedef void (*tuple_decode_func)(u_int8_t*, int, void*);
|
typedef void (*tuple_decode_func)(u_int8_t*, int, void*);
|
||||||
|
@ -595,7 +593,7 @@ cardbus_rescan(struct device *self, const char *ifattr, const int *locators)
|
||||||
locs[CARDBUSCF_FUNCTION] = function;
|
locs[CARDBUSCF_FUNCTION] = function;
|
||||||
|
|
||||||
if ((csc = config_found_sm_loc((void *)sc, "cardbus", locs,
|
if ((csc = config_found_sm_loc((void *)sc, "cardbus", locs,
|
||||||
&ca, cardbusprint, cardbussubmatch)) == NULL) {
|
&ca, cardbusprint, config_stdsubmatch)) == NULL) {
|
||||||
/* do not match */
|
/* do not match */
|
||||||
disable_function(sc, function);
|
disable_function(sc, function);
|
||||||
sc->sc_funcs[function] = NULL;
|
sc->sc_funcs[function] = NULL;
|
||||||
|
@ -614,24 +612,6 @@ cardbus_rescan(struct device *self, const char *ifattr, const int *locators)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
cardbussubmatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* ldesc->locs[CARDBUSCF_DEV] is always 0 */
|
|
||||||
if (cf->cf_loc[CARDBUSCF_DEV] != CARDBUSCF_DEV_DEFAULT &&
|
|
||||||
cf->cf_loc[CARDBUSCF_DEV] != locs[CARDBUSCF_DEV]) {
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
if (cf->cf_loc[CARDBUSCF_FUNCTION] != CARDBUSCF_FUNCTION_DEFAULT &&
|
|
||||||
cf->cf_loc[CARDBUSCF_FUNCTION] != locs[CARDBUSCF_FUNCTION]) {
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cardbusprint(void *aux, const char *pnp)
|
cardbusprint(void *aux, const char *pnp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: eisa.c,v 1.37 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: eisa.c,v 1.38 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996 Christopher G. Demetriou
|
* Copyright (c) 1995, 1996 Christopher G. Demetriou
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.37 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.38 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_eisaverbose.h"
|
#include "opt_eisaverbose.h"
|
||||||
|
|
||||||
|
@ -61,8 +61,6 @@ static void eisaattach(struct device *, struct device *, void *);
|
||||||
CFATTACH_DECL(eisa, sizeof(struct device),
|
CFATTACH_DECL(eisa, sizeof(struct device),
|
||||||
eisamatch, eisaattach, NULL, NULL);
|
eisamatch, eisaattach, NULL, NULL);
|
||||||
|
|
||||||
static int eisasubmatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
static int eisaprint(void *, const char *);
|
static int eisaprint(void *, const char *);
|
||||||
static void eisa_devinfo(const char *, char *, size_t);
|
static void eisa_devinfo(const char *, char *, size_t);
|
||||||
|
|
||||||
|
@ -88,17 +86,6 @@ eisaprint(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
eisasubmatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t * locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[EISACF_SLOT] != EISACF_SLOT_DEFAULT &&
|
|
||||||
cf->cf_loc[EISACF_SLOT] != locs[EISACF_SLOT])
|
|
||||||
return (0);
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eisaattach(struct device *parent, struct device *self, void *aux)
|
eisaattach(struct device *parent, struct device *self, void *aux)
|
||||||
{
|
{
|
||||||
|
@ -195,7 +182,7 @@ eisaattach(struct device *parent, struct device *self, void *aux)
|
||||||
|
|
||||||
/* Attach matching device. */
|
/* Attach matching device. */
|
||||||
config_found_sm_loc(self, "eisa", locs, &ea,
|
config_found_sm_loc(self, "eisa", locs, &ea,
|
||||||
eisaprint, eisasubmatch);
|
eisaprint, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: iop.c,v 1.49 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: iop.c,v 1.50 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.49 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.50 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_i2o.h"
|
#include "opt_i2o.h"
|
||||||
#include "iop.h"
|
#include "iop.h"
|
||||||
|
@ -228,8 +228,6 @@ static void iop_configure_devices(struct iop_softc *, int, int);
|
||||||
static void iop_devinfo(int, char *, size_t);
|
static void iop_devinfo(int, char *, size_t);
|
||||||
static int iop_print(void *, const char *);
|
static int iop_print(void *, const char *);
|
||||||
static void iop_shutdown(void *);
|
static void iop_shutdown(void *);
|
||||||
static int iop_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
static void iop_adjqparam(struct iop_softc *, int);
|
static void iop_adjqparam(struct iop_softc *, int);
|
||||||
static void iop_create_reconf_thread(void *);
|
static void iop_create_reconf_thread(void *);
|
||||||
|
@ -591,7 +589,8 @@ iop_config_interrupts(struct device *self)
|
||||||
ia.ia_class = I2O_CLASS_ANY;
|
ia.ia_class = I2O_CLASS_ANY;
|
||||||
ia.ia_tid = I2O_TID_IOP;
|
ia.ia_tid = I2O_TID_IOP;
|
||||||
locs[IOPCF_TID] = I2O_TID_IOP;
|
locs[IOPCF_TID] = I2O_TID_IOP;
|
||||||
config_found_sm_loc(self, "iop", locs, &ia, iop_print, iop_submatch);
|
config_found_sm_loc(self, "iop", locs, &ia, iop_print,
|
||||||
|
config_stdsubmatch);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start device configuration.
|
* Start device configuration.
|
||||||
|
@ -841,7 +840,7 @@ iop_configure_devices(struct iop_softc *sc, int mask, int maskval)
|
||||||
locs[IOPCF_TID] = ia.ia_tid;
|
locs[IOPCF_TID] = ia.ia_tid;
|
||||||
|
|
||||||
dv = config_found_sm_loc(&sc->sc_dv, "iop", locs, &ia,
|
dv = config_found_sm_loc(&sc->sc_dv, "iop", locs, &ia,
|
||||||
iop_print, iop_submatch);
|
iop_print, config_stdsubmatch);
|
||||||
if (dv != NULL) {
|
if (dv != NULL) {
|
||||||
sc->sc_tidmap[i].it_flags |= IT_CONFIGURED;
|
sc->sc_tidmap[i].it_flags |= IT_CONFIGURED;
|
||||||
strcpy(sc->sc_tidmap[i].it_dvname, dv->dv_xname);
|
strcpy(sc->sc_tidmap[i].it_dvname, dv->dv_xname);
|
||||||
|
@ -898,18 +897,6 @@ iop_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
iop_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[IOPCF_TID] != IOPCF_TID_DEFAULT &&
|
|
||||||
cf->cf_loc[IOPCF_TID] != locs[IOPCF_TID])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shut down all configured IOPs.
|
* Shut down all configured IOPs.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: aac.c,v 1.22 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: aac.c,v 1.23 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.22 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.23 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -111,8 +111,6 @@ static int aac_sync_command(struct aac_softc *, u_int32_t, u_int32_t,
|
||||||
u_int32_t, u_int32_t, u_int32_t, u_int32_t *);
|
u_int32_t, u_int32_t, u_int32_t, u_int32_t *);
|
||||||
static int aac_sync_fib(struct aac_softc *, u_int32_t, u_int32_t, void *,
|
static int aac_sync_fib(struct aac_softc *, u_int32_t, u_int32_t, void *,
|
||||||
u_int16_t, void *, u_int16_t *);
|
u_int16_t, void *, u_int16_t *);
|
||||||
static int aac_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
#ifdef AAC_DEBUG
|
#ifdef AAC_DEBUG
|
||||||
static void aac_print_fib(struct aac_softc *, struct aac_fib *, char *);
|
static void aac_print_fib(struct aac_softc *, struct aac_fib *, char *);
|
||||||
|
@ -256,7 +254,7 @@ aac_attach(struct aac_softc *sc)
|
||||||
locs[AACCF_UNIT] = i;
|
locs[AACCF_UNIT] = i;
|
||||||
|
|
||||||
config_found_sm_loc(&sc->sc_dv, "aac", locs, &aaca,
|
config_found_sm_loc(&sc->sc_dv, "aac", locs, &aaca,
|
||||||
aac_print, aac_submatch);
|
aac_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -304,21 +302,6 @@ aac_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Match a sub-device.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
aac_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[AACCF_UNIT] != AACCF_UNIT_DEFAULT &&
|
|
||||||
cf->cf_loc[AACCF_UNIT] != locs[AACCF_UNIT])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look up a text description of a numeric error code and return a pointer to
|
* Look up a text description of a numeric error code and return a pointer to
|
||||||
* same.
|
* same.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: cac.c,v 1.31 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: cac.c,v 1.32 2005/08/25 22:33:18 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.31 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.32 2005/08/25 22:33:18 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -71,8 +71,6 @@ static int cac_ccb_poll(struct cac_softc *, struct cac_ccb *, int);
|
||||||
static int cac_ccb_start(struct cac_softc *, struct cac_ccb *);
|
static int cac_ccb_start(struct cac_softc *, struct cac_ccb *);
|
||||||
static int cac_print(void *, const char *);
|
static int cac_print(void *, const char *);
|
||||||
static void cac_shutdown(void *);
|
static void cac_shutdown(void *);
|
||||||
static int cac_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
static struct cac_ccb *cac_l0_completed(struct cac_softc *);
|
static struct cac_ccb *cac_l0_completed(struct cac_softc *);
|
||||||
static int cac_l0_fifo_full(struct cac_softc *);
|
static int cac_l0_fifo_full(struct cac_softc *);
|
||||||
|
@ -187,7 +185,7 @@ cac_init(struct cac_softc *sc, const char *intrstr, int startfw)
|
||||||
locs[CACCF_UNIT] = i;
|
locs[CACCF_UNIT] = i;
|
||||||
|
|
||||||
config_found_sm_loc(&sc->sc_dv, "cac", locs, &caca,
|
config_found_sm_loc(&sc->sc_dv, "cac", locs, &caca,
|
||||||
cac_print, cac_submatch);
|
cac_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set our `shutdownhook' before we start any device activity. */
|
/* Set our `shutdownhook' before we start any device activity. */
|
||||||
|
@ -235,21 +233,6 @@ cac_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Match a sub-device.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
cac_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[CACCF_UNIT] != CACCF_UNIT_DEFAULT &&
|
|
||||||
cf->cf_loc[CACCF_UNIT] != locs[CACCF_UNIT])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle an interrupt from the controller: process finished CCBs and
|
* Handle an interrupt from the controller: process finished CCBs and
|
||||||
* dequeue any waiting CCBs.
|
* dequeue any waiting CCBs.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: i82365.c,v 1.91 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: i82365.c,v 1.92 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
|
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.91 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.92 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#define PCICDEBUG
|
#define PCICDEBUG
|
||||||
|
|
||||||
|
@ -89,8 +89,6 @@ int pcic_debug = 0;
|
||||||
void pcic_attach_socket(struct pcic_handle *);
|
void pcic_attach_socket(struct pcic_handle *);
|
||||||
void pcic_attach_socket_finish(struct pcic_handle *);
|
void pcic_attach_socket_finish(struct pcic_handle *);
|
||||||
|
|
||||||
int pcic_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
int pcic_print (void *arg, const char *pnp);
|
int pcic_print (void *arg, const char *pnp);
|
||||||
int pcic_intr_socket(struct pcic_handle *);
|
int pcic_intr_socket(struct pcic_handle *);
|
||||||
void pcic_poll_intr(void *);
|
void pcic_poll_intr(void *);
|
||||||
|
@ -417,7 +415,7 @@ pcic_attach_socket(h)
|
||||||
locs[PCMCIABUSCF_SOCKET] = h->socket;
|
locs[PCMCIABUSCF_SOCKET] = h->socket;
|
||||||
|
|
||||||
h->pcmcia = config_found_sm_loc(&sc->dev, "pcmciabus", locs, &paa,
|
h->pcmcia = config_found_sm_loc(&sc->dev, "pcmciabus", locs, &paa,
|
||||||
pcic_print, pcic_submatch);
|
pcic_print, config_stdsubmatch);
|
||||||
if (h->pcmcia == NULL) {
|
if (h->pcmcia == NULL) {
|
||||||
h->flags &= ~PCIC_FLAG_SOCKETP;
|
h->flags &= ~PCIC_FLAG_SOCKETP;
|
||||||
return;
|
return;
|
||||||
|
@ -639,24 +637,6 @@ pcic_event_thread(arg)
|
||||||
kthread_exit(0);
|
kthread_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
pcic_submatch(parent, cf, locs, aux)
|
|
||||||
struct device *parent;
|
|
||||||
struct cfdata *cf;
|
|
||||||
const locdesc_t *locs;
|
|
||||||
void *aux;
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] != PCMCIABUSCF_CONTROLLER_DEFAULT &&
|
|
||||||
cf->cf_loc[PCMCIABUSCF_CONTROLLER] != locs[PCMCIABUSCF_CONTROLLER])
|
|
||||||
return 0;
|
|
||||||
if (cf->cf_loc[PCMCIABUSCF_SOCKET] != PCMCIABUSCF_SOCKET_DEFAULT &&
|
|
||||||
cf->cf_loc[PCMCIABUSCF_SOCKET] != locs[PCMCIABUSCF_SOCKET])
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pcic_print(arg, pnp)
|
pcic_print(arg, pnp)
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: icp.c,v 1.15 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: icp.c,v 1.16 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
|
* Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.15 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.16 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -117,8 +117,6 @@ int icp_async_event(struct icp_softc *, int);
|
||||||
void icp_ccb_submit(struct icp_softc *icp, struct icp_ccb *ic);
|
void icp_ccb_submit(struct icp_softc *icp, struct icp_ccb *ic);
|
||||||
void icp_chain(struct icp_softc *);
|
void icp_chain(struct icp_softc *);
|
||||||
int icp_print(void *, const char *);
|
int icp_print(void *, const char *);
|
||||||
int icp_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
void icp_watchdog(void *);
|
void icp_watchdog(void *);
|
||||||
void icp_ucmd_intr(struct icp_ccb *);
|
void icp_ucmd_intr(struct icp_ccb *);
|
||||||
void icp_recompute_openings(struct icp_softc *);
|
void icp_recompute_openings(struct icp_softc *);
|
||||||
|
@ -388,7 +386,7 @@ icp_init(struct icp_softc *icp, const char *intrstr)
|
||||||
|
|
||||||
icp->icp_children[icpa.icpa_unit] =
|
icp->icp_children[icpa.icpa_unit] =
|
||||||
config_found_sm_loc(&icp->icp_dv, "icp", locs,
|
config_found_sm_loc(&icp->icp_dv, "icp", locs,
|
||||||
&icpa, icp_print, icp_submatch);
|
&icpa, icp_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +404,7 @@ icp_init(struct icp_softc *icp, const char *intrstr)
|
||||||
|
|
||||||
icp->icp_children[icpa.icpa_unit] =
|
icp->icp_children[icpa.icpa_unit] =
|
||||||
config_found_sm_loc(&icp->icp_dv, "icp", locs,
|
config_found_sm_loc(&icp->icp_dv, "icp", locs,
|
||||||
&icpa, icp_print, icp_submatch);
|
&icpa, icp_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,7 +528,7 @@ icp_rescan(struct icp_softc *icp, int unit)
|
||||||
locs[ICPCF_UNIT] = unit;
|
locs[ICPCF_UNIT] = unit;
|
||||||
|
|
||||||
icp->icp_children[unit] = config_found_sm_loc(&icp->icp_dv,
|
icp->icp_children[unit] = config_found_sm_loc(&icp->icp_dv,
|
||||||
"icp", locs, &icpa, icp_print, icp_submatch);
|
"icp", locs, &icpa, icp_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
icp_recompute_openings(icp);
|
icp_recompute_openings(icp);
|
||||||
|
@ -642,18 +640,6 @@ icp_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
icp_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[ICPCF_UNIT] != ICPCF_UNIT_DEFAULT &&
|
|
||||||
cf->cf_loc[ICPCF_UNIT] != locs[ICPCF_UNIT])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
icp_async_event(struct icp_softc *icp, int service)
|
icp_async_event(struct icp_softc *icp, int service)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mlx.c,v 1.35 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: mlx.c,v 1.36 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.35 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.36 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include "ld.h"
|
#include "ld.h"
|
||||||
|
|
||||||
|
@ -133,8 +133,6 @@ static void mlx_periodic_thread(void *);
|
||||||
static int mlx_print(void *, const char *);
|
static int mlx_print(void *, const char *);
|
||||||
static int mlx_rebuild(struct mlx_softc *, int, int);
|
static int mlx_rebuild(struct mlx_softc *, int, int);
|
||||||
static void mlx_shutdown(void *);
|
static void mlx_shutdown(void *);
|
||||||
static int mlx_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
static int mlx_user_command(struct mlx_softc *, struct mlx_usercommand *);
|
static int mlx_user_command(struct mlx_softc *, struct mlx_usercommand *);
|
||||||
|
|
||||||
static __inline__ time_t mlx_curtime(void);
|
static __inline__ time_t mlx_curtime(void);
|
||||||
|
@ -645,7 +643,7 @@ mlx_configure(struct mlx_softc *mlx, int waitok)
|
||||||
locs[MLXCF_UNIT] = i;
|
locs[MLXCF_UNIT] = i;
|
||||||
|
|
||||||
ms->ms_dv = config_found_sm_loc(&mlx->mlx_dv, "mlx", locs,
|
ms->ms_dv = config_found_sm_loc(&mlx->mlx_dv, "mlx", locs,
|
||||||
&mlxa, mlx_print, mlx_submatch);
|
&mlxa, mlx_print, config_stdsubmatch);
|
||||||
nunits += (ms->ms_dv != NULL);
|
nunits += (ms->ms_dv != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,21 +672,6 @@ mlx_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Match a sub-device.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
mlx_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[MLXCF_UNIT] != MLXCF_UNIT_DEFAULT &&
|
|
||||||
cf->cf_loc[MLXCF_UNIT] != locs[MLXCF_UNIT])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shut down all configured `mlx' devices.
|
* Shut down all configured `mlx' devices.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: tcic2.c,v 1.21 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: tcic2.c,v 1.22 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 1999 Christoph Badura. All rights reserved.
|
* Copyright (c) 1998, 1999 Christoph Badura. All rights reserved.
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.21 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.22 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#undef TCICDEBUG
|
#undef TCICDEBUG
|
||||||
|
|
||||||
|
@ -70,8 +70,6 @@ int tcic_debug = 1;
|
||||||
void tcic_attach_socket(struct tcic_handle *);
|
void tcic_attach_socket(struct tcic_handle *);
|
||||||
void tcic_init_socket(struct tcic_handle *);
|
void tcic_init_socket(struct tcic_handle *);
|
||||||
|
|
||||||
int tcic_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
int tcic_print(void *arg, const char *pnp);
|
int tcic_print(void *arg, const char *pnp);
|
||||||
int tcic_intr_socket(struct tcic_handle *);
|
int tcic_intr_socket(struct tcic_handle *);
|
||||||
|
|
||||||
|
@ -433,7 +431,7 @@ tcic_attach_socket(h)
|
||||||
locs[PCMCIABUSCF_SOCKET] = h->sock;
|
locs[PCMCIABUSCF_SOCKET] = h->sock;
|
||||||
|
|
||||||
h->pcmcia = config_found_sm_loc(&h->sc->dev, "pcmciabus", locs, &paa,
|
h->pcmcia = config_found_sm_loc(&h->sc->dev, "pcmciabus", locs, &paa,
|
||||||
tcic_print, tcic_submatch);
|
tcic_print, config_stdsubmatch);
|
||||||
|
|
||||||
/* if there's actually a pcmcia device attached, initialize the slot */
|
/* if there's actually a pcmcia device attached, initialize the slot */
|
||||||
|
|
||||||
|
@ -535,24 +533,6 @@ tcic_init_socket(h)
|
||||||
tcic_attach_card(h);
|
tcic_attach_card(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
tcic_submatch(parent, cf, locs, aux)
|
|
||||||
struct device *parent;
|
|
||||||
struct cfdata *cf;
|
|
||||||
const locdesc_t *locs;
|
|
||||||
void *aux;
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] != PCMCIABUSCF_CONTROLLER_DEFAULT &&
|
|
||||||
cf->cf_loc[PCMCIABUSCF_CONTROLLER] != locs[PCMCIABUSCF_CONTROLLER])
|
|
||||||
return 0;
|
|
||||||
if (cf->cf_loc[PCMCIABUSCF_SOCKET] != PCMCIABUSCF_SOCKET_DEFAULT &&
|
|
||||||
cf->cf_loc[PCMCIABUSCF_SOCKET] != locs[PCMCIABUSCF_SOCKET])
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tcic_print(arg, pnp)
|
tcic_print(arg, pnp)
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: upc.c,v 1.10 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: upc.c,v 1.11 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000, 2003 Ben Harris
|
* Copyright (c) 2000, 2003 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: upc.c,v 1.10 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: upc.c,v 1.11 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
@ -70,8 +70,6 @@ static void upc_found(struct upc_softc *, char const *, int, int,
|
||||||
static void upc_found2(struct upc_softc *, char const *, int, int, int, int,
|
static void upc_found2(struct upc_softc *, char const *, int, int, int, int,
|
||||||
struct upc_irqhandle *);
|
struct upc_irqhandle *);
|
||||||
static int upc_print(void *, char const *);
|
static int upc_print(void *, char const *);
|
||||||
static int upc_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
static int upc2_com3_addr(int);
|
static int upc2_com3_addr(int);
|
||||||
static int upc2_com4_addr(int);
|
static int upc2_com4_addr(int);
|
||||||
|
|
||||||
|
@ -222,7 +220,7 @@ upc_found(struct upc_softc *sc, char const *devtype, int offset, int size,
|
||||||
locs[UPCCF_OFFSET] = offset;
|
locs[UPCCF_OFFSET] = offset;
|
||||||
|
|
||||||
config_found_sm_loc(&sc->sc_dev, "upc", locs, &ua,
|
config_found_sm_loc(&sc->sc_dev, "upc", locs, &ua,
|
||||||
upc_print, upc_submatch);
|
upc_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -243,7 +241,7 @@ upc_found2(struct upc_softc *sc, char const *devtype, int offset, int size,
|
||||||
locs[UPCCF_OFFSET] = offset;
|
locs[UPCCF_OFFSET] = offset;
|
||||||
|
|
||||||
config_found_sm_loc(&sc->sc_dev, "upc", locs, &ua,
|
config_found_sm_loc(&sc->sc_dev, "upc", locs, &ua,
|
||||||
upc_print, upc_submatch);
|
upc_print, config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -301,19 +299,6 @@ upc_print(void *aux, char const *pnp)
|
||||||
return UNCONF;
|
return UNCONF;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
upc_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
struct upc_attach_args *ua = aux;
|
|
||||||
|
|
||||||
if (strcmp(cf->cf_name, ua->ua_devtype) == 0 &&
|
|
||||||
(cf->cf_loc[UPCCF_OFFSET] == UPCCF_OFFSET_DEFAULT ||
|
|
||||||
cf->cf_loc[UPCCF_OFFSET] == locs[UPCCF_OFFSET]))
|
|
||||||
return config_match(parent, cf, aux);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
upc1_read_config(struct upc_softc *sc, int reg)
|
upc1_read_config(struct upc_softc *sc, int reg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mca.c,v 1.18 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: mca.c,v 1.19 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.18 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.19 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -62,8 +62,6 @@ void mca_attach(struct device *, struct device *, void *);
|
||||||
CFATTACH_DECL(mca, sizeof(struct device),
|
CFATTACH_DECL(mca, sizeof(struct device),
|
||||||
mca_match, mca_attach, NULL, NULL);
|
mca_match, mca_attach, NULL, NULL);
|
||||||
|
|
||||||
int mca_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
int mca_print(void *, const char *);
|
int mca_print(void *, const char *);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -117,20 +115,6 @@ mca_print(aux, pnp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
mca_submatch(parent, cf, locs, aux)
|
|
||||||
struct device *parent;
|
|
||||||
struct cfdata *cf;
|
|
||||||
const locdesc_t *locs;
|
|
||||||
void *aux;
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[MCACF_SLOT] != MCACF_SLOT_DEFAULT &&
|
|
||||||
cf->cf_loc[MCACF_SLOT] != locs[MCACF_SLOT])
|
|
||||||
return 0;
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mca_attach(parent, self, aux)
|
mca_attach(parent, self, aux)
|
||||||
struct device *parent, *self;
|
struct device *parent, *self;
|
||||||
|
@ -182,7 +166,7 @@ mca_attach(parent, self, aux)
|
||||||
if (ma.ma_pos[2] & MCA_POS2_ENABLE
|
if (ma.ma_pos[2] & MCA_POS2_ENABLE
|
||||||
|| mca_match_disabled(ma.ma_id))
|
|| mca_match_disabled(ma.ma_id))
|
||||||
config_found_sm_loc(self, "mca", locs, &ma,
|
config_found_sm_loc(self, "mca", locs, &ma,
|
||||||
mca_print, mca_submatch);
|
mca_print, config_stdsubmatch);
|
||||||
else {
|
else {
|
||||||
mca_print(&ma, self->dv_xname);
|
mca_print(&ma, self->dv_xname);
|
||||||
printf(" disabled\n");
|
printf(" disabled\n");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mii.c,v 1.38 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: mii.c,v 1.39 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.38 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.39 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
@ -59,8 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.38 2005/08/25 18:35:39 drochner Exp $");
|
||||||
#include "locators.h"
|
#include "locators.h"
|
||||||
|
|
||||||
static int mii_print(void *, const char *);
|
static int mii_print(void *, const char *);
|
||||||
static int mii_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper function used by network interface drivers, attaches PHYs
|
* Helper function used by network interface drivers, attaches PHYs
|
||||||
|
@ -146,7 +144,7 @@ mii_attach(struct device *parent, struct mii_data *mii, int capmask,
|
||||||
locs[MIICF_PHY] = ma.mii_phyno;
|
locs[MIICF_PHY] = ma.mii_phyno;
|
||||||
|
|
||||||
child = (struct mii_softc *)config_found_sm_loc(parent, "mii",
|
child = (struct mii_softc *)config_found_sm_loc(parent, "mii",
|
||||||
locs, &ma, mii_print, mii_submatch);
|
locs, &ma, mii_print, config_stdsubmatch);
|
||||||
if (child) {
|
if (child) {
|
||||||
/*
|
/*
|
||||||
* Link it up in the parent's MII data.
|
* Link it up in the parent's MII data.
|
||||||
|
@ -235,18 +233,6 @@ mii_print(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
mii_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[MIICF_PHY] != MIICF_PHY_DEFAULT &&
|
|
||||||
cf->cf_loc[MIICF_PHY] != locs[MIICF_PHY])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Media changed; notify all PHYs.
|
* Media changed; notify all PHYs.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: pci.c,v 1.94 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: pci.c,v 1.95 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996, 1997, 1998
|
* Copyright (c) 1995, 1996, 1997, 1998
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.94 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.95 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_pci.h"
|
#include "opt_pci.h"
|
||||||
|
|
||||||
|
@ -59,8 +59,6 @@ int pci_config_dump = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int pciprint(void *, const char *);
|
int pciprint(void *, const char *);
|
||||||
int pcisubmatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
#ifdef PCI_MACHDEP_ENUMERATE_BUS
|
#ifdef PCI_MACHDEP_ENUMERATE_BUS
|
||||||
#define pci_enumerate_bus PCI_MACHDEP_ENUMERATE_BUS
|
#define pci_enumerate_bus PCI_MACHDEP_ENUMERATE_BUS
|
||||||
|
@ -243,20 +241,6 @@ pciprint(void *aux, const char *pnp)
|
||||||
return (UNCONF);
|
return (UNCONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
pcisubmatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[PCICF_DEV] != PCICF_DEV_DEFAULT &&
|
|
||||||
cf->cf_loc[PCICF_DEV] != locs[PCICF_DEV])
|
|
||||||
return (0);
|
|
||||||
if (cf->cf_loc[PCICF_FUNCTION] != PCICF_FUNCTION_DEFAULT &&
|
|
||||||
cf->cf_loc[PCICF_FUNCTION] != locs[PCICF_FUNCTION])
|
|
||||||
return (0);
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_probe_device(struct pci_softc *sc, pcitag_t tag,
|
pci_probe_device(struct pci_softc *sc, pcitag_t tag,
|
||||||
int (*match)(struct pci_attach_args *), struct pci_attach_args *pap)
|
int (*match)(struct pci_attach_args *), struct pci_attach_args *pap)
|
||||||
|
@ -353,7 +337,7 @@ pci_probe_device(struct pci_softc *sc, pcitag_t tag,
|
||||||
locs[PCICF_FUNCTION] = function;
|
locs[PCICF_FUNCTION] = function;
|
||||||
|
|
||||||
subdev = config_found_sm_loc(&sc->sc_dev, "pci", locs, &pa,
|
subdev = config_found_sm_loc(&sc->sc_dev, "pci", locs, &pa,
|
||||||
pciprint, pcisubmatch);
|
pciprint, config_stdsubmatch);
|
||||||
sc->PCI_SC_DEVICESC(device, function) = subdev;
|
sc->PCI_SC_DEVICESC(device, function) = subdev;
|
||||||
ret = (subdev != NULL);
|
ret = (subdev != NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: pckbport.c,v 1.5 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: pckbport.c,v 1.6 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 Ben Harris
|
* Copyright (c) 2004 Ben Harris
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.5 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.6 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -77,8 +77,6 @@ struct pckbport_slotdata {
|
||||||
#define CMD_IN_QUEUE(q) (TAILQ_FIRST(&(q)->cmdqueue) != NULL)
|
#define CMD_IN_QUEUE(q) (TAILQ_FIRST(&(q)->cmdqueue) != NULL)
|
||||||
|
|
||||||
static void pckbport_init_slotdata(struct pckbport_slotdata *);
|
static void pckbport_init_slotdata(struct pckbport_slotdata *);
|
||||||
static int pckbport_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
static int pckbportprint(void *, const char *);
|
static int pckbportprint(void *, const char *);
|
||||||
|
|
||||||
static struct pckbport_slotdata pckbport_cons_slotdata;
|
static struct pckbport_slotdata pckbport_cons_slotdata;
|
||||||
|
@ -118,17 +116,6 @@ pckbport_send_devcmd(struct pckbport_tag *t, pckbport_slot_t slot, u_char val)
|
||||||
return t->t_ops->t_send_devcmd(t->t_cookie, slot, val);
|
return t->t_ops->t_send_devcmd(t->t_cookie, slot, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
pckbport_submatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[PCKBPORTCF_SLOT] != PCKBPORTCF_SLOT_DEFAULT &&
|
|
||||||
cf->cf_loc[PCKBPORTCF_SLOT] != locs[PCKBPORTCF_SLOT])
|
|
||||||
return 0;
|
|
||||||
return config_match(parent, cf, aux);
|
|
||||||
}
|
|
||||||
|
|
||||||
pckbport_tag_t
|
pckbport_tag_t
|
||||||
pckbport_attach(void *cookie, struct pckbport_accessops const *ops)
|
pckbport_attach(void *cookie, struct pckbport_accessops const *ops)
|
||||||
{
|
{
|
||||||
|
@ -172,7 +159,7 @@ pckbport_attach_slot(struct device *dev, pckbport_tag_t t,
|
||||||
locs[PCKBPORTCF_SLOT] = slot;
|
locs[PCKBPORTCF_SLOT] = slot;
|
||||||
|
|
||||||
found = config_found_sm_loc(dev, "pckbport", locs, &pa,
|
found = config_found_sm_loc(dev, "pckbport", locs, &pa,
|
||||||
pckbportprint, pckbport_submatch);
|
pckbportprint, config_stdsubmatch);
|
||||||
|
|
||||||
if (found == NULL && alloced) {
|
if (found == NULL && alloced) {
|
||||||
free(t->t_slotdata[slot], M_DEVBUF);
|
free(t->t_slotdata[slot], M_DEVBUF);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: pcmcia.c,v 1.75 2005/08/25 18:35:39 drochner Exp $ */
|
/* $NetBSD: pcmcia.c,v 1.76 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
|
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.75 2005/08/25 18:35:39 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.76 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include "opt_pcmciaverbose.h"
|
#include "opt_pcmciaverbose.h"
|
||||||
|
|
||||||
|
@ -79,8 +79,6 @@ int pcmcia_verbose = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int pcmcia_match(struct device *, struct cfdata *, void *);
|
int pcmcia_match(struct device *, struct cfdata *, void *);
|
||||||
int pcmcia_submatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
void pcmcia_attach(struct device *, struct device *, void *);
|
void pcmcia_attach(struct device *, struct device *, void *);
|
||||||
int pcmcia_rescan(struct device *, const char *, const int *);
|
int pcmcia_rescan(struct device *, const char *, const int *);
|
||||||
void pcmcia_childdetached(struct device *, struct device *);
|
void pcmcia_childdetached(struct device *, struct device *);
|
||||||
|
@ -242,7 +240,8 @@ pcmcia_rescan(struct device *self, const char *ifattr, const int *locators)
|
||||||
paa.pf = pf;
|
paa.pf = pf;
|
||||||
|
|
||||||
pf->child = config_found_sm_loc(self, "pcmcia", locs, &paa,
|
pf->child = config_found_sm_loc(self, "pcmcia", locs, &paa,
|
||||||
pcmcia_print, pcmcia_submatch);
|
pcmcia_print,
|
||||||
|
config_stdsubmatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -329,21 +328,6 @@ pcmcia_card_deactivate(dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
pcmcia_submatch(parent, cf, locs, aux)
|
|
||||||
struct device *parent;
|
|
||||||
const locdesc_t *locs;
|
|
||||||
struct cfdata *cf;
|
|
||||||
void *aux;
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[PCMCIACF_FUNCTION] != PCMCIACF_FUNCTION_DEFAULT &&
|
|
||||||
cf->cf_loc[PCMCIACF_FUNCTION] != locs[PCMCIACF_FUNCTION])
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pcmcia_print(arg, pnp)
|
pcmcia_print(arg, pnp)
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: scsiconf.c,v 1.231 2005/08/25 18:35:40 drochner Exp $ */
|
/* $NetBSD: scsiconf.c,v 1.232 2005/08/25 22:33:19 drochner Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.231 2005/08/25 18:35:40 drochner Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.232 2005/08/25 22:33:19 drochner Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -101,9 +101,6 @@ static int scsibusdetach(struct device *, int flags);
|
||||||
static int scsibusrescan(struct device *, const char *, const int *);
|
static int scsibusrescan(struct device *, const char *, const int *);
|
||||||
static void scsidevdetached(struct device *, struct device *);
|
static void scsidevdetached(struct device *, struct device *);
|
||||||
|
|
||||||
static int scsibussubmatch(struct device *, struct cfdata *,
|
|
||||||
const locdesc_t *, void *);
|
|
||||||
|
|
||||||
CFATTACH_DECL2(scsibus, sizeof(struct scsibus_softc),
|
CFATTACH_DECL2(scsibus, sizeof(struct scsibus_softc),
|
||||||
scsibusmatch, scsibusattach, scsibusdetach, scsibusactivate,
|
scsibusmatch, scsibusattach, scsibusdetach, scsibusactivate,
|
||||||
scsibusrescan, scsidevdetached);
|
scsibusrescan, scsidevdetached);
|
||||||
|
@ -242,20 +239,6 @@ scsibus_config(struct scsipi_channel *chan, void *arg)
|
||||||
config_pending_decr();
|
config_pending_decr();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
scsibussubmatch(struct device *parent, struct cfdata *cf,
|
|
||||||
const locdesc_t *locs, void *aux)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cf->cf_loc[SCSIBUSCF_TARGET] != SCSIBUSCF_TARGET_DEFAULT &&
|
|
||||||
cf->cf_loc[SCSIBUSCF_TARGET] != locs[SCSIBUSCF_TARGET])
|
|
||||||
return (0);
|
|
||||||
if (cf->cf_loc[SCSIBUSCF_LUN] != SCSIBUSCF_LUN_DEFAULT &&
|
|
||||||
cf->cf_loc[SCSIBUSCF_LUN] != locs[SCSIBUSCF_LUN])
|
|
||||||
return (0);
|
|
||||||
return (config_match(parent, cf, aux));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
scsibusactivate(struct device *self, enum devact act)
|
scsibusactivate(struct device *self, enum devact act)
|
||||||
{
|
{
|
||||||
|
@ -956,7 +939,7 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun)
|
||||||
locs[SCSIBUSCF_TARGET] = target;
|
locs[SCSIBUSCF_TARGET] = target;
|
||||||
locs[SCSIBUSCF_LUN] = lun;
|
locs[SCSIBUSCF_LUN] = lun;
|
||||||
|
|
||||||
if ((cf = config_search_loc(scsibussubmatch, &sc->sc_dev,
|
if ((cf = config_search_loc(config_stdsubmatch, &sc->sc_dev,
|
||||||
"scsibus", locs, &sa)) != NULL) {
|
"scsibus", locs, &sa)) != NULL) {
|
||||||
scsipi_insert_periph(chan, periph);
|
scsipi_insert_periph(chan, periph);
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue