From f9eff050ad4be59836a45a79208954a6d13a0a9f Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Sun, 26 Jul 2026 21:36:50 +0900 Subject: [PATCH] ixgbed: fix pci_allocate_interrupt_vector method call to free function Commit 717bc436 introduced MSI-X support via pci_allocate_interrupt_vector but called it as a method on PciFunction (.pci_allocate_interrupt_vector(1)), which doesn't exist. The function is actually a free function in pcid_interface::irq_helpers, matching the pattern used by e1000d, rtl8139d, rtl8139d, and ihdad. Fix: add the import and change the call to match e1000d's pattern: pci_allocate_interrupt_vector(&mut pcid_handle, "ixgbed") This unblocks the base cook for all targets. --- drivers/net/ixgbed/src/main.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/net/ixgbed/src/main.rs b/drivers/net/ixgbed/src/main.rs index c0d509264f..a4ea879be7 100644 --- a/drivers/net/ixgbed/src/main.rs +++ b/drivers/net/ixgbed/src/main.rs @@ -3,6 +3,7 @@ use std::os::unix::io::AsRawFd; use driver_network::NetworkScheme; use event::{user_data, EventQueue}; +use pcid_interface::irq_helpers::pci_allocate_interrupt_vector; use pcid_interface::PciFunctionHandle; pub mod device; @@ -19,18 +20,15 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! { let mut name = pci_config.func.name(); name.push_str("_ixgbe"); - // Allocate one interrupt vector. pcid_interface::pci_allocate_interrupt_vector - // prefers MSI-X when the device advertises it and falls back to MSI and - // legacy INTX otherwise, so this single line makes the driver work on - // every modern 82599/X540/X550 board that has MSI-X wired. - let irq = pci_config - .func - .pci_allocate_interrupt_vector(1) - .expect("ixgbed: failed to allocate an interrupt vector"); + // Allocate one interrupt vector via the pcid_interface helper. Prefers + // MSI-X when the device advertises it and falls back to MSI and legacy + // INTX otherwise, so this single call makes the driver work on every + // modern 82599/X540/X550 board that has MSI-X wired. + let irq_vector = pci_allocate_interrupt_vector(&mut pcid_handle, "ixgbed"); println!(" + IXGBE {}", pci_config.func.display()); - let mut irq_file = irq.irq_handle("ixgbed"); + let mut irq_file = irq_vector.irq_handle(); let mapped_bar = unsafe { pcid_handle.map_bar(0) }; let address = mapped_bar.ptr.as_ptr();