summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2001-09-03 09:45:41 +0000
committeryokota <yokota@FreeBSD.org>2001-09-03 09:45:41 +0000
commitb349f963f3d411b3eccca3e5fd32d2effae2df23 (patch)
treee5bb04e5f99d15e7a897d0be0532b4c293949903 /sys/isa
parent66f042086196b8865a9ff402202a9b6c93ab3216 (diff)
downloadFreeBSD-src-b349f963f3d411b3eccca3e5fd32d2effae2df23.zip
FreeBSD-src-b349f963f3d411b3eccca3e5fd32d2effae2df23.tar.gz
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.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/isa_common.c8
-rw-r--r--sys/isa/isa_common.h3
-rw-r--r--sys/isa/isavar.h4
3 files changed, 14 insertions, 1 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 6d87b7a..22677e3 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 70b8b33..b940d14 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 856b519..d81685c 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);
OpenPOWER on IntegriCloud