diff options
author | gonzo <gonzo@FreeBSD.org> | 2016-11-06 18:40:12 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2016-11-06 18:40:12 +0000 |
commit | b82022461caea290c7bce683816b76f5bad5d78d (patch) | |
tree | 4a04888a8377ec5623ae862e2b374ecdf586d221 /sys/arm64 | |
parent | 476fa99d66ff006a890ec0755cee69ff5fb89759 (diff) | |
download | FreeBSD-src-b82022461caea290c7bce683816b76f5bad5d78d.zip FreeBSD-src-b82022461caea290c7bce683816b76f5bad5d78d.tar.gz |
MFC r306899, r307059, r307151
r306899:
Fix release MSI method for ARM GIC
r307059:
INTRNG - fix MSI/MSIX release path
Use isrc in attached MSI data structure instead of using map's
isrc directly. map's isrc is set to NULL on IRQ deactivation
which happens prior to pci_release_msi so MSI_RELEASE_MSI
receives array of NULLs
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D8206
r307151:
INTRNG: Propagate IRQ activation error to API consumer
Keep resource state consistent with INTRNG state - if intr_activate_irq
fails - deactivate resource and propagate error to calling function
Reviewed by: mmel
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/nexus.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 26e1c6c..3e071cb 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -346,7 +346,11 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid, rman_set_virtual(r, (void *)vaddr); rman_set_bushandle(r, vaddr); } else if (type == SYS_RES_IRQ) { - intr_activate_irq(child, r); + err = intr_activate_irq(child, r); + if (err != 0) { + rman_deactivate_resource(r); + return (err); + } } return (0); } |