From 7abb46623b110886549279fa8e8315dd957065c9 Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Mon, 3 Sep 2001 09:45:41 +0000 Subject: [PATCH] Add a new field, id_config_attr to the struct isa_device. It will be later used to store some flags to control PnP device configurations. --- sys/isa/isa_common.c | 8 ++++++++ sys/isa/isa_common.h | 3 +++ sys/isa/isavar.h | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 6d87b7a31ef7..22677e3c2416 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -748,6 +748,10 @@ isa_read_ivar(device_t bus, device_t dev, int index, uintptr_t * result) *result = idev->id_compatid; break; + case ISA_IVAR_CONFIGATTR: + *result = idev->id_config_attr; + break; + default: return ENOENT; } @@ -792,6 +796,10 @@ isa_write_ivar(device_t bus, device_t dev, idev->id_compatid = value; break; + case ISA_IVAR_CONFIGATTR: + idev->id_config_attr = value; + break; + default: return (ENOENT); } diff --git a/sys/isa/isa_common.h b/sys/isa/isa_common.h index 70b8b339533f..b940d1463f94 100644 --- a/sys/isa/isa_common.h +++ b/sys/isa/isa_common.h @@ -57,6 +57,9 @@ struct isa_device { struct isa_config_list id_configs; /* pnp config alternatives */ isa_config_cb *id_config_cb; /* callback function */ void *id_config_arg; /* callback argument */ + int id_config_attr; /* pnp config attributes */ +#define ISACFGATTR_CANDISABLE (1 << 0) /* can be disabled */ +#define ISACFGATTR_DYNAMIC (1 << 1) /* dynamic configuration */ }; #define DEVTOISA(dev) ((struct isa_device *) device_get_ivars(dev)) diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index 856b51959f0a..d81685ca8531 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -123,7 +123,8 @@ enum isa_device_ivars { ISA_IVAR_VENDORID, ISA_IVAR_SERIAL, ISA_IVAR_LOGICALID, - ISA_IVAR_COMPATID + ISA_IVAR_COMPATID, + ISA_IVAR_CONFIGATTR }; /* @@ -154,6 +155,7 @@ ISA_ACCESSOR(vendorid, VENDORID, int) ISA_ACCESSOR(serial, SERIAL, int) ISA_ACCESSOR(logicalid, LOGICALID, int) ISA_ACCESSOR(compatid, COMPATID, int) +ISA_ACCESSOR(configattr, CONFIGATTR, int) extern intrmask_t isa_irq_pending(void); extern void isa_probe_children(device_t dev);