pci_alloc_irq_vectors(9)

pci_alloc_irq_vectors9

Allocate multiple irqs for a device

Usage

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

Overview

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.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.