Index: alpha/isa/isa.c =================================================================== RCS file: /usr/cvs/src/sys/alpha/isa/Attic/isa.c,v retrieving revision 1.36.8.1 diff -u -r1.36.8.1 isa.c --- alpha/isa/isa.c 10 Mar 2006 19:37:30 -0000 1.36.8.1 +++ alpha/isa/isa.c 2 Oct 2007 17:50:14 -0000 @@ -232,6 +232,7 @@ res = rman_reserve_resource(&isa_drq_rman, start, start, 1, 0, child); + rman_set_rid(res, *rid); if (res && !passthrough) { rle = resource_list_find(rl, type, *rid); rle->start = rman_get_start(res); Index: alpha/pci/apecs_pci.c =================================================================== RCS file: /usr/cvs/src/sys/alpha/pci/Attic/apecs_pci.c,v retrieving revision 1.15 diff -u -r1.15 apecs_pci.c --- alpha/pci/apecs_pci.c 22 Aug 2003 07:20:27 -0000 1.15 +++ alpha/pci/apecs_pci.c 2 Oct 2007 17:50:47 -0000 @@ -79,12 +79,17 @@ apecs_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if ((hwrpb->rpb_type == ST_DEC_2100_A50) && (type == SYS_RES_IRQ)) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int Index: alpha/pci/lca_pci.c =================================================================== RCS file: /usr/cvs/src/sys/alpha/pci/Attic/lca_pci.c,v retrieving revision 1.17 diff -u -r1.17 lca_pci.c --- alpha/pci/lca_pci.c 22 Aug 2003 07:20:27 -0000 1.17 +++ alpha/pci/lca_pci.c 2 Oct 2007 17:50:59 -0000 @@ -78,11 +78,16 @@ lca_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct resource *rv = NULL; + if (type == SYS_RES_IRQ) - return isa_alloc_intr(bus, child, start); + rv = isa_alloc_intr(bus, child, start); else - return alpha_pci_alloc_resource(bus, child, type, rid, - start, end, count, flags); + rv = alpha_pci_alloc_resource(bus, child, type, rid, + start, end, count, flags); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } static int Index: alpha/pci/pcibus.c =================================================================== RCS file: /usr/cvs/src/sys/alpha/pci/Attic/pcibus.c,v retrieving revision 1.36 diff -u -r1.36 pcibus.c --- alpha/pci/pcibus.c 5 Jan 2005 20:05:52 -0000 1.36 +++ alpha/pci/pcibus.c 2 Oct 2007 17:52:06 -0000 @@ -97,7 +97,12 @@ alpha_platform_alloc_ide_intr(int chan) { int irqs[2] = { 14, 15 }; - return isa_alloc_intr(0, 0, irqs[chan]); + struct resource *rv; + + rv = isa_alloc_intr(0, 0, irqs[chan]); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } int @@ -230,9 +235,11 @@ #ifdef DEV_ISA if((start >= ISA_IRQ_OFFSET) && (end < ISA_IRQ_OFFSET + ISA_IRQ_LEN)) { - return isa_alloc_intrs(bus, child, - start - ISA_IRQ_OFFSET, - end - ISA_IRQ_OFFSET); + rv = isa_alloc_intrs(bus, child, + start - ISA_IRQ_OFFSET, end - ISA_IRQ_OFFSET); + if (rv != NULL) + rman_set_rid(rv, *rid); + return (rv); } else #endif @@ -252,6 +259,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rman_set_bustag(rv, ALPHAPCI_GET_BUSTAG(bus, type)); rman_set_bushandle(rv, rv->r_start); switch (type) { Index: amd64/amd64/nexus.c =================================================================== RCS file: /usr/cvs/src/sys/amd64/amd64/nexus.c,v retrieving revision 1.66.2.4 diff -u -r1.66.2.4 nexus.c --- amd64/amd64/nexus.c 15 Aug 2007 21:12:07 -0000 1.66.2.4 +++ amd64/amd64/nexus.c 2 Oct 2007 17:44:17 -0000 @@ -347,7 +347,7 @@ 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, AMD64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { Index: arm/arm/nexus.c =================================================================== RCS file: /usr/cvs/src/sys/arm/arm/nexus.c,v retrieving revision 1.5 diff -u -r1.5 nexus.c --- arm/arm/nexus.c 9 Jun 2005 12:26:19 -0000 1.5 +++ arm/arm/nexus.c 2 Oct 2007 17:38:56 -0000 @@ -215,6 +215,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM); rman_set_bushandle(rv, rv->r_start); Index: arm/xscale/i80321/i80321_pci.c =================================================================== RCS file: /usr/cvs/src/sys/arm/xscale/i80321/i80321_pci.c,v retrieving revision 1.4.2.2 diff -u -r1.4.2.2 i80321_pci.c --- arm/xscale/i80321/i80321_pci.c 25 Feb 2007 23:09:50 -0000 1.4.2.2 +++ arm/xscale/i80321/i80321_pci.c 2 Oct 2007 17:44:56 -0000 @@ -388,6 +388,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); + rman_set_rid(rv, *rid); if (type != SYS_RES_IRQ) { if (type == SYS_RES_MEMORY) bh += (rman_get_start(rv)); Index: arm/xscale/i80321/obio.c =================================================================== RCS file: /usr/cvs/src/sys/arm/xscale/i80321/obio.c,v retrieving revision 1.2 diff -u -r1.2 obio.c --- arm/xscale/i80321/obio.c 5 Jan 2005 21:58:49 -0000 1.2 +++ arm/xscale/i80321/obio.c 2 Oct 2007 17:46:14 -0000 @@ -122,6 +122,7 @@ rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); Index: i386/i386/nexus.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/nexus.c,v retrieving revision 1.62.2.4 diff -u -r1.62.2.4 nexus.c --- i386/i386/nexus.c 15 Aug 2007 21:12:08 -0000 1.62.2.4 +++ i386/i386/nexus.c 2 Oct 2007 17:38:35 -0000 @@ -365,7 +365,7 @@ 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); } else if (type == SYS_RES_IOPORT) { Index: ia64/ia64/nexus.c =================================================================== RCS file: /usr/cvs/src/sys/ia64/ia64/nexus.c,v retrieving revision 1.11.2.1 diff -u -r1.11.2.1 nexus.c --- ia64/ia64/nexus.c 24 Apr 2006 17:26:46 -0000 1.11.2.1 +++ ia64/ia64/nexus.c 2 Oct 2007 17:46:48 -0000 @@ -403,6 +403,7 @@ if (rv == 0) return 0; + rman_set_rid(rv, *rid); if (type == SYS_RES_MEMORY) { rman_set_bustag(rv, IA64_BUS_SPACE_MEM); } else if (type == SYS_RES_IOPORT) { Index: powerpc/powermac/grackle.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/powermac/grackle.c,v retrieving revision 1.7 diff -u -r1.7 grackle.c --- powerpc/powermac/grackle.c 7 Jan 2005 02:29:20 -0000 1.7 +++ powerpc/powermac/grackle.c 2 Oct 2007 17:53:41 -0000 @@ -398,6 +398,7 @@ return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, rman_get_start(rv)); Index: powerpc/powermac/hrowpic.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/powermac/hrowpic.c,v retrieving revision 1.10 diff -u -r1.10 hrowpic.c --- powerpc/powermac/hrowpic.c 7 Jan 2005 02:29:20 -0000 1.10 +++ powerpc/powermac/hrowpic.c 2 Oct 2007 17:53:41 -0000 @@ -214,6 +214,7 @@ device_get_nameunit(child)); return (NULL); } + rman_set_rid(rv, *rid); return (rv); } Index: powerpc/powermac/macio.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/powermac/macio.c,v retrieving revision 1.18 diff -u -r1.18 macio.c --- powerpc/powermac/macio.c 7 Jan 2005 02:29:20 -0000 1.18 +++ powerpc/powermac/macio.c 2 Oct 2007 17:53:41 -0000 @@ -458,6 +458,7 @@ return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, tagval); rman_set_bushandle(rv, rman_get_start(rv)); Index: powerpc/powermac/uninorth.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/powermac/uninorth.c,v retrieving revision 1.13.2.1 diff -u -r1.13.2.1 uninorth.c --- powerpc/powermac/uninorth.c 1 May 2007 18:07:28 -0000 1.13.2.1 +++ powerpc/powermac/uninorth.c 2 Oct 2007 17:53:41 -0000 @@ -381,6 +381,7 @@ return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, rman_get_start(rv)); Index: powerpc/powerpc/openpic.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/powerpc/openpic.c,v retrieving revision 1.13 diff -u -r1.13 openpic.c --- powerpc/powerpc/openpic.c 7 Jan 2005 02:29:20 -0000 1.13 +++ powerpc/powerpc/openpic.c 2 Oct 2007 17:53:41 -0000 @@ -212,7 +212,7 @@ 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, Index: powerpc/psim/iobus.c =================================================================== RCS file: /usr/cvs/src/sys/powerpc/psim/iobus.c,v retrieving revision 1.8 diff -u -r1.8 iobus.c --- powerpc/psim/iobus.c 7 Jan 2005 02:29:21 -0000 1.8 +++ powerpc/psim/iobus.c 2 Oct 2007 17:53:41 -0000 @@ -341,6 +341,7 @@ return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, tagval); rman_set_bushandle(rv, rman_get_start(rv)); Index: sparc64/ebus/ebus.c =================================================================== RCS file: /usr/cvs/src/sys/sparc64/ebus/ebus.c,v retrieving revision 1.23.2.1 diff -u -r1.23.2.1 ebus.c --- sparc64/ebus/ebus.c 30 Jan 2006 22:30:50 -0000 1.23.2.1 +++ sparc64/ebus/ebus.c 2 Oct 2007 17:54:14 -0000 @@ -335,6 +335,7 @@ 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), Index: sparc64/pci/psycho.c =================================================================== RCS file: /usr/cvs/src/sys/sparc64/pci/psycho.c,v retrieving revision 1.53.2.3 diff -u -r1.53.2.3 psycho.c --- sparc64/pci/psycho.c 1 May 2007 13:31:32 -0000 1.53.2.3 +++ sparc64/pci/psycho.c 2 Oct 2007 17:54:14 -0000 @@ -1192,7 +1192,7 @@ 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); Index: sparc64/sbus/sbus.c =================================================================== RCS file: /usr/cvs/src/sys/sparc64/sbus/sbus.c,v retrieving revision 1.35.2.3 diff -u -r1.35.2.3 sbus.c --- sparc64/sbus/sbus.c 30 Jan 2007 15:44:16 -0000 1.35.2.3 +++ sparc64/sbus/sbus.c 2 Oct 2007 17:54:14 -0000 @@ -823,6 +823,7 @@ 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) { Index: sparc64/sparc64/nexus.c =================================================================== RCS file: /usr/cvs/src/sys/sparc64/sparc64/nexus.c,v retrieving revision 1.17 diff -u -r1.17 nexus.c --- sparc64/sparc64/nexus.c 21 May 2005 20:19:27 -0000 1.17 +++ sparc64/sparc64/nexus.c 2 Oct 2007 17:54:14 -0000 @@ -367,6 +367,7 @@ 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));