/* Return value: Interrupt mode associated with the port  */
static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
/* Return value: Interrupt mode associated with the port  */
static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
{
	int i, irq;
	if (!pcie_port_enable_msix(dev, irqs, mask))
		return 0;
	irq = -1;
	if (!pci_enable_msi(dev) || dev->pin)
		irq = dev->irq;
	for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++)
		irqs[i] = irq;
	irqs[PCIE_PORT_SERVICE_VC_SHIFT] = -1;
	if (irq < 0)
		return -ENODEV;
	return 0;
}