aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci/msi-octeon.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/pci/msi-octeon.c')
-rw-r--r--arch/mips/pci/msi-octeon.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c
index 7c756408b85d..d8080499872a 100644
--- a/arch/mips/pci/msi-octeon.c
+++ b/arch/mips/pci/msi-octeon.c
@@ -177,6 +177,34 @@ msi_irq_allocated:
177 return 0; 177 return 0;
178} 178}
179 179
180int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
181{
182 struct msi_desc *entry;
183 int ret;
184
185 /*
186 * MSI-X is not supported.
187 */
188 if (type == PCI_CAP_ID_MSIX)
189 return -EINVAL;
190
191 /*
192 * If an architecture wants to support multiple MSI, it needs to
193 * override arch_setup_msi_irqs()
194 */
195 if (type == PCI_CAP_ID_MSI && nvec > 1)
196 return 1;
197
198 list_for_each_entry(entry, &dev->msi_list, list) {
199 ret = arch_setup_msi_irq(dev, entry);
200 if (ret < 0)
201 return ret;
202 if (ret > 0)
203 return -ENOSPC;
204 }
205
206 return 0;
207}
180 208
181/** 209/**
182 * Called when a device no longer needs its MSI interrupts. All 210 * Called when a device no longer needs its MSI interrupts. All