Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234208
b: refs/heads/master
c: f420e01
h: refs/heads/master
v: v3
  • Loading branch information
Ian Campbell authored and Konrad Rzeszutek Wilk committed Mar 10, 2011
1 parent 560a3a4 commit 2b855ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e55288f63343f0810f4f0a3004f78037cfb93d3
refs/heads/master: f420e010edd84eb2c237fc87b7451e69740fed46
10 changes: 1 addition & 9 deletions trunk/arch/x86/pci/xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,15 @@ static void xen_teardown_msi_irq(unsigned int irq)
#ifdef CONFIG_XEN_DOM0
static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
int irq, ret;
int irq;
struct msi_desc *msidesc;

list_for_each_entry(msidesc, &dev->msi_list, list) {
irq = xen_create_msi_irq(dev, msidesc, type);
if (irq < 0)
return -1;

ret = set_irq_msi(irq, msidesc);
if (ret)
goto error;
}
return 0;

error:
xen_destroy_irq(irq);
return ret;
}
#endif
#endif
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,

int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
{
int irq = -1;
int ret, irq = -1;
struct physdev_map_pirq map_irq;
int rc;
int pos;
Expand Down Expand Up @@ -736,9 +736,17 @@ int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
handle_level_irq,
(type == PCI_CAP_ID_MSIX) ? "msi-x":"msi");

ret = set_irq_msi(irq, msidesc);
if (ret)
goto out_irq;

out:
spin_unlock(&irq_mapping_update_lock);
return irq;
out_irq:
spin_unlock(&irq_mapping_update_lock);
xen_free_irq(irq);
return -1;
}
#endif

Expand Down

0 comments on commit 2b855ec

Please sign in to comment.