Set the rid for any resource obtained from rman_resource_reserve.

This commit is contained in:
Warner Losh 2006-04-20 04:19:10 +00:00
parent 80837e3924
commit bdfb66f8ca
6 changed files with 6 additions and 1 deletions

View File

@ -398,6 +398,7 @@ grackle_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, bt);
rman_set_bushandle(rv, rman_get_start(rv));

View File

@ -214,6 +214,7 @@ hrowpic_allocate_intr(device_t picdev, device_t child, int *rid, u_long intr,
device_get_nameunit(child));
return (NULL);
}
rman_set_rid(rv, *rid);
return (rv);
}

View File

@ -448,6 +448,7 @@ macio_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, tagval);
rman_set_bushandle(rv, rman_get_start(rv));

View File

@ -384,6 +384,7 @@ uninorth_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, bt);
rman_set_bushandle(rv, rman_get_start(rv));

View File

@ -212,7 +212,7 @@ openpic_allocate_intr(device_t dev, device_t child, int *rid, u_long intr,
device_get_nameunit(child));
return (NULL);
}
rman_set_rid(rv, *rid);
if (needactivate) {
if (bus_activate_resource(child, SYS_RES_IRQ, *rid, rv) != 0) {
device_printf(dev,

View File

@ -341,6 +341,7 @@ iobus_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, tagval);
rman_set_bushandle(rv, rman_get_start(rv));