git: 5fd93b626c68 - stable/15 - LinuxKPI: add PCI_IRQ_AFFINITY #define

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 19 Sep 2026 14:40:29 UTC
The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=5fd93b626c683184c98eb5127b6ae127804f3aa5

commit 5fd93b626c683184c98eb5127b6ae127804f3aa5
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-08-16 22:01:44 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-09-19 09:34:11 +0000

    LinuxKPI: add PCI_IRQ_AFFINITY #define
    
    Add the #define for PCI_IRQ_AFFINITY and leave a pr_debug note in
    pci_alloc_irq_vectors() that it is unimplemented.
    
    The flag is needed by an upcoming WiFi driver.
    
    Reviewed by:    dumbbell
    Differential Revision: https://reviews.freebsd.org/D58881
    
    (cherry picked from commit b589e403a2c3bd2a94fb2ab88cd23255c68a9f05)
---
 sys/compat/linuxkpi/common/include/linux/pci.h | 1 +
 sys/compat/linuxkpi/common/src/linux_pci.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
index f6799ab6be28..16c672de2688 100644
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -241,6 +241,7 @@ extern const char *pci_power_names[6];
 #define	PCI_IRQ_INTX			0x01
 #define	PCI_IRQ_MSI			0x02
 #define	PCI_IRQ_MSIX			0x04
+#define	PCI_IRQ_AFFINITY		0x08
 #define	PCI_IRQ_ALL_TYPES		(PCI_IRQ_MSIX|PCI_IRQ_MSI|PCI_IRQ_INTX)
 
 #if defined(LINUXKPI_VERSION) && (LINUXKPI_VERSION <= 61000)
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
index ab8d5cf98534..b5aee166de2d 100644
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -1580,6 +1580,9 @@ pci_alloc_irq_vectors(struct pci_dev *pdev, int minv, int maxv,
 {
 	int error;
 
+	if ((flags & PCI_IRQ_AFFINITY) != 0) {
+		pr_debug("%s: TODO PCI_IRQ_AFFINITY\n", __func__);
+	}
 	if (flags & PCI_IRQ_MSIX) {
 		struct msix_entry *entries;
 		int i;