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.
This commit is contained in:
parent
97967c08dc
commit
3ad72a92eb
@ -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);
|
struct pccard_devinfo *devi = device_get_ivars(child);
|
||||||
int err;
|
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) {
|
switch (type) {
|
||||||
case SYS_RES_IOPORT: {
|
case SYS_RES_IOPORT: {
|
||||||
struct io_desc *ip;
|
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);
|
struct pccard_devinfo *devi = device_get_ivars(child);
|
||||||
int err;
|
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) {
|
switch (type) {
|
||||||
case SYS_RES_IOPORT: {
|
case SYS_RES_IOPORT: {
|
||||||
struct io_desc *ip = &devi->slt->io[rid];
|
struct io_desc *ip = &devi->slt->io[rid];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user