Deactivate IRQ resource by calling to intr_deactivate_irq().

This is the part of INTRNG support that was missed.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Ruslan Bukin 2019-05-01 15:03:12 +00:00
parent 65f1fc3f3f
commit adf208e786
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346994

View File

@ -357,13 +357,17 @@ nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,
bus_size_t psize;
bus_space_handle_t vaddr;
psize = (bus_size_t)rman_get_size(r);
vaddr = rman_get_bushandle(r);
if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
psize = (bus_size_t)rman_get_size(r);
vaddr = rman_get_bushandle(r);
if (vaddr != 0) {
bus_space_unmap(&memmap_bus, vaddr, psize);
rman_set_virtual(r, NULL);
rman_set_bushandle(r, 0);
if (vaddr != 0) {
bus_space_unmap(&memmap_bus, vaddr, psize);
rman_set_virtual(r, NULL);
rman_set_bushandle(r, 0);
}
} else if (type == SYS_RES_IRQ) {
intr_deactivate_irq(child, r);
}
return (rman_deactivate_resource(r));