Skip to content

Commit

Permalink
vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
Browse files Browse the repository at this point in the history
This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler
without which vfio_pci_set_err_trigger() would never be called.

While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case
so if we add more indexes later, we won't miss it.

Fixes: 6140a8f ("vfio-pci: Add device request interface")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Alexey Kardashevskiy authored and Alex Williamson committed Mar 12, 2015
1 parent 9eccca0 commit ec76f40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/vfio/pci/vfio_pci_intrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,12 +868,14 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags,
func = vfio_pci_set_err_trigger;
break;
}
break;
case VFIO_PCI_REQ_IRQ_INDEX:
switch (flags & VFIO_IRQ_SET_ACTION_TYPE_MASK) {
case VFIO_IRQ_SET_ACTION_TRIGGER:
func = vfio_pci_set_req_trigger;
break;
}
break;
}

if (!func)
Expand Down

0 comments on commit ec76f40

Please sign in to comment.