Why is pci_msi_enable function deprecated yet still callable within 5.4 linux kernel?

Viewed 94
1 Answers

From the MSI Driver Guide HOWTO:

Most of the hard work is done for the driver in the PCI layer. The driver simply has to request that the PCI layer set up the MSI capability for this device.

To automatically use MSI or MSI-X interrupt vectors, use the following function:

int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
             unsigned int max_vecs, unsigned int flags);

Looking at the source we can see pci_enable_msi calls __pci_enable_msi_range(dev, 1, 1, NULL) (see here).

This same function is called in pci_alloc_irq_vectors and pci_alloc_irq_vectors_affinity (see here and here).

Related