Set the rid for any resource obtained from rman_reserve_resource.

Reviewed by: wollman, jmg	(as were the other commits fixing this problem)
This commit is contained in:
Warner Losh 2006-04-20 04:20:41 +00:00
parent bdfb66f8ca
commit 2f443d2d8f
4 changed files with 4 additions and 1 deletions

View File

@ -321,6 +321,7 @@ ebus_alloc_resource(device_t bus, device_t child, int type, int *rid,
flags, child);
if (res == NULL)
return (NULL);
rman_set_rid(res, *rid);
bt = rman_get_bustag(ri->eri_res);
rman_set_bustag(res, bt);
rv = bus_space_subregion(bt, rman_get_bushandle(ri->eri_res),

View File

@ -1057,7 +1057,7 @@ psycho_alloc_resource(device_t bus, device_t child, int type, int *rid,
rv = rman_reserve_resource(rm, start, end, count, flags, child);
if (rv == NULL)
return (NULL);
rman_set_rid(rv, *rid);
bh += rman_get_start(rv);
rman_set_bustag(rv, bt);
rman_set_bushandle(rv, bh);

View File

@ -805,6 +805,7 @@ sbus_alloc_resource(device_t bus, device_t child, int type, int *rid,
child);
if (rv == NULL)
return (NULL);
rman_set_rid(rv, *rid);
rman_set_bustag(rv, sc->sc_cbustag);
rman_set_bushandle(rv, bh + rman_get_start(rv));
if (needactivate) {

View File

@ -367,6 +367,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
rv = rman_reserve_resource(rm, start, end, count, flags, child);
if (rv == NULL)
return (NULL);
rman_set_rid(rv, *rid);
if (type == SYS_RES_MEMORY) {
rman_set_bustag(rv, &nexus_bustag);
rman_set_bushandle(rv, rman_get_start(rv));