summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ofw/ofwbus.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index 142ee1a..23e604a 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -271,12 +271,17 @@ ofwbus_release_resource(device_t bus, device_t child, int type,
int rid, struct resource *r)
{
struct resource_list_entry *rle;
+ int passthrough;
int error;
- /* Clean resource list entry */
- rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid);
- if (rle != NULL)
- rle->res = NULL;
+ passthrough = (device_get_parent(child) != bus);
+ if (!passthrough) {
+ /* Clean resource list entry */
+ rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child),
+ type, rid);
+ if (rle != NULL)
+ rle->res = NULL;
+ }
if ((rman_get_flags(r) & RF_ACTIVE) != 0) {
error = bus_deactivate_resource(child, type, rid, r);
OpenPOWER on IntegriCloud