VFIO: platform: clear IRQ_NOAUTOEN when de-assigning the IRQ
authorEric Auger <eric.auger@linaro.org>
Wed, 14 Oct 2015 15:32:56 +0000 (15:32 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 27 Oct 2015 21:02:53 +0000 (15:02 -0600)
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 <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform_irq.c

index 88bba57b30a8b28eefded76cd3ec3f9cd8912001..46d4750f43a8dccd574ea21f4fe53ecef4ec764c 100644 (file)
@@ -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);