Skip to content

Commit

Permalink
xen/pciback: Don't setup an fake IRQ handler for SR-IOV devices.
Browse files Browse the repository at this point in the history
If we try to setup an fake IRQ handler for legacy interrupts
for devices that only have MSI-X (most if not all SR-IOV cards),
we will fail with this:

pciback[0000:01:10.0]: failed to install fake IRQ handler for IRQ 0! (rc:-38)

Since those cards don't have anything in dev->irq.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Konrad Rzeszutek Wilk committed Jul 20, 2011
1 parent a0b2fa8 commit e17ab35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/xen/xen-pciback/pciback_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ void pciback_control_isr(struct pci_dev *dev, int reset)
if (enable)
dev_data->irq = dev->irq;

/*
* SR-IOV devices in all use MSI-X and have no legacy
* interrupts, so inhibit creating a fake IRQ handler for them.
*/
if (dev_data->irq == 0)
goto out;

dev_dbg(&dev->dev, "%s: #%d %s %s%s %s-> %s\n",
dev_data->irq_name,
dev_data->irq,
Expand Down

0 comments on commit e17ab35

Please sign in to comment.