Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204598
b: refs/heads/master
c: 52a0f00
h: refs/heads/master
v: v3
  • Loading branch information
Chandrakala Chavva authored and Ralf Baechle committed Aug 5, 2010
1 parent b70fdce commit 9f6fab2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1aa2b2782a056b9bb0a19fae5a04624d8dcd8379
refs/heads/master: 52a0f00b50ea360e3cf7e3281523c6a8aafc5761
5 changes: 5 additions & 0 deletions trunk/arch/mips/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
return channel ? 15 : 14;
}

#ifdef CONFIG_CPU_CAVIUM_OCTEON
/* MSI arch hook for OCTEON */
#define arch_setup_msi_irqs arch_setup_msi_irqs
#endif

extern int pci_probe_only;

extern char * (*pcibios_plat_setup)(char *str);
Expand Down
28 changes: 28 additions & 0 deletions trunk/arch/mips/pci/msi-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,34 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
return 0;
}

int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
struct msi_desc *entry;
int ret;

/*
* MSI-X is not supported.
*/
if (type == PCI_CAP_ID_MSIX)
return -EINVAL;

/*
* If an architecture wants to support multiple MSI, it needs to
* override arch_setup_msi_irqs()
*/
if (type == PCI_CAP_ID_MSI && nvec > 1)
return 1;

list_for_each_entry(entry, &dev->msi_list, list) {
ret = arch_setup_msi_irq(dev, entry);
if (ret < 0)
return ret;
if (ret > 0)
return -ENOSPC;
}

return 0;
}

/**
* Called when a device no longer needs its MSI interrupts. All
Expand Down

0 comments on commit 9f6fab2

Please sign in to comment.