---
name: "pci_alloc_irq_vectors"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_alloc_irq_vectors"
---

# pci\_alloc\_irq\_vectors(9)

allocate multiple IRQs for a device

## NAME

pci\_alloc\_irq\_vectors - allocate multiple IRQs for a device

## SYNOPSIS

**int pci\_alloc\_irq\_vectors(struct pci\_dev \*** *dev***, unsigned int** *min\_vecs***, unsigned int** *max\_vecs***, unsigned int** *flags***);**

## ARGUMENTS

*dev*

PCI device to operate on

*min\_vecs*

minimum number of vectors required (must be \>= 1)

*max\_vecs*

maximum (desired) number of vectors

*flags*

flags or quirks for the allocation

## DESCRIPTION

Allocate up to *max\_vecs* interrupt vectors for *dev*, using MSI-X or MSI vectors if available, and fall back to a single legacy vector if neither is available. Return the number of vectors allocated, (which might be smaller than *max\_vecs*) if successful, or a negative error code on error. If less than *min\_vecs* interrupt vectors are available for *dev* the function will fail with -ENOSPC.

To get the Linux IRQ number used for a vector that can be passed to **request\_irq** use the **pci\_irq\_vector** helper.

## COPYRIGHT
