⬢ DragonFlyBSD Kernel Audit
DF-4998 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/ral/if_ral_pci.c	2026-09-25 17:49:54.151891734 +0000
+++ b/sys/dev/netif/ral/if_ral_pci.c	2026-09-25 17:50:33.675378174 +0000
@@ -251,7 +251,9 @@
 	sc->sc_invalid = 1;
 	
 #if defined(__DragonFly__)
-	psc->sc_irq_type = pci_alloc_1intr(dev, ~ral_msi_disable,
+	/* pci_alloc_1intr() wants a boolean *enable* flag: ~x is truthy
+	   for both x==0 and x==1, which made hw.ral.msi_disable a no-op. */
+	psc->sc_irq_type = pci_alloc_1intr(dev, !ral_msi_disable,
 					    &rid, &irq_flags);
 	psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, irq_flags);
 #else