From: Eric Auger Date: Wed, 14 Oct 2015 15:32:56 +0000 (+0000) Subject: VFIO: platform: clear IRQ_NOAUTOEN when de-assigning the IRQ X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1276ece32c5d18790e8bcff89e692fd3c1790bab;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git VFIO: platform: clear IRQ_NOAUTOEN when de-assigning the IRQ The vfio platform driver currently sets the IRQ_NOAUTOEN before doing the request_irq to properly handle the user masking. However it does not clear it when de-assigning the IRQ. This brings issues when loading the native driver again which may not explicitly enable the IRQ. This problem was observed with xgbe driver. Signed-off-by: Eric Auger Signed-off-by: Alex Williamson --- diff --git a/drivers/vfio/platform/vfio_platform_irq.c b/drivers/vfio/platform/vfio_platform_irq.c index 88bba57b30a8..46d4750f43a8 100644 --- a/drivers/vfio/platform/vfio_platform_irq.c +++ b/drivers/vfio/platform/vfio_platform_irq.c @@ -185,6 +185,7 @@ static int vfio_set_trigger(struct vfio_platform_device *vdev, int index, int ret; if (irq->trigger) { + irq_clear_status_flags(irq->hwirq, IRQ_NOAUTOEN); free_irq(irq->hwirq, irq); kfree(irq->name); eventfd_ctx_put(irq->trigger);