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.
This commit is contained in:
Kazutaka YOKOTA 2001-09-03 09:45:41 +00:00
parent 033d275cb0
commit 7abb46623b
3 changed files with 14 additions and 1 deletions

View File

@ -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);
}

View File

@ -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))

View File

@ -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);