nexus_alloc_resource: Add missing rman_set_rid()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 16 Dec 2011 06:09:16 +0000 (14:09 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 16 Dec 2011 08:08:03 +0000 (16:08 +0800)
sys/platform/pc32/i386/nexus.c
sys/platform/pc64/x86_64/nexus.c

index b321bbc..92cb4a5 100644 (file)
@@ -379,6 +379,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 == 0)
                return 0;
+       rman_set_rid(rv, *rid);
 
        if (type == SYS_RES_MEMORY) {
                rman_set_bustag(rv, I386_BUS_SPACE_MEM);
index 2ab6deb..156b9b6 100644 (file)
@@ -375,6 +375,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 == 0)
                return 0;
+       rman_set_rid(rv, *rid);
 
        if (type == SYS_RES_MEMORY) {
                rman_set_bustag(rv, I386_BUS_SPACE_MEM);