diff options
author | imp <imp@FreeBSD.org> | 2001-05-14 04:53:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-14 04:53:02 +0000 |
commit | 9350da3f9847bf5ef63748000a29fd5685788a32 (patch) | |
tree | d899f603003387298a4da935fa155169db9b8a26 /sys/pccard/pcic.c | |
parent | 6cfabf52542f075d198dc1ed4b488571becbb977 (diff) | |
download | FreeBSD-src-9350da3f9847bf5ef63748000a29fd5685788a32.zip FreeBSD-src-9350da3f9847bf5ef63748000a29fd5685788a32.tar.gz |
When activating or deactivating a resource, only attempt to deal with
the resource activation if we're dealing with our grandchild.
Otherwise, we run into two problems. One, if the pccard layer wanted
to allocate and activate something, we'd wind up trying to do the
wrong thing twice: the ivars are wrong and we don't want the bridge to
map the resource to the slot. If we're more than a grandchild, then
who knows what kind of ivar is present. In either of these cases, we
just pass it up the food chain.
Diffstat (limited to 'sys/pccard/pcic.c')
-rw-r--r-- | sys/pccard/pcic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 9b319c7..f76e72f 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -1135,6 +1135,10 @@ pcic_activate_resource(device_t dev, device_t child, int type, int rid, struct pccard_devinfo *devi = device_get_ivars(child); int err; + if (dev != device_get_parent(device_get_parent(child)) || devi == NULL) + return (bus_generic_activate_resource(dev, child, type, + rid, r)); + switch (type) { case SYS_RES_IOPORT: { struct io_desc *ip; @@ -1187,6 +1191,10 @@ pcic_deactivate_resource(device_t dev, device_t child, int type, int rid, struct pccard_devinfo *devi = device_get_ivars(child); int err; + if (dev != device_get_parent(device_get_parent(child)) || devi == NULL) + return (bus_generic_deactivate_resource(dev, child, type, + rid, r)); + switch (type) { case SYS_RES_IOPORT: { struct io_desc *ip = &devi->slt->io[rid]; |