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.
This commit is contained in:
@@ -3,6 +3,7 @@ use std::os::unix::io::AsRawFd;
|
|||||||
|
|
||||||
use driver_network::NetworkScheme;
|
use driver_network::NetworkScheme;
|
||||||
use event::{user_data, EventQueue};
|
use event::{user_data, EventQueue};
|
||||||
|
use pcid_interface::irq_helpers::pci_allocate_interrupt_vector;
|
||||||
use pcid_interface::PciFunctionHandle;
|
use pcid_interface::PciFunctionHandle;
|
||||||
|
|
||||||
pub mod device;
|
pub mod device;
|
||||||
@@ -19,18 +20,15 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|||||||
let mut name = pci_config.func.name();
|
let mut name = pci_config.func.name();
|
||||||
name.push_str("_ixgbe");
|
name.push_str("_ixgbe");
|
||||||
|
|
||||||
// Allocate one interrupt vector. pcid_interface::pci_allocate_interrupt_vector
|
// Allocate one interrupt vector via the pcid_interface helper. Prefers
|
||||||
// prefers MSI-X when the device advertises it and falls back to MSI and
|
// MSI-X when the device advertises it and falls back to MSI and legacy
|
||||||
// legacy INTX otherwise, so this single line makes the driver work on
|
// INTX otherwise, so this single call makes the driver work on every
|
||||||
// every modern 82599/X540/X550 board that has MSI-X wired.
|
// modern 82599/X540/X550 board that has MSI-X wired.
|
||||||
let irq = pci_config
|
let irq_vector = pci_allocate_interrupt_vector(&mut pcid_handle, "ixgbed");
|
||||||
.func
|
|
||||||
.pci_allocate_interrupt_vector(1)
|
|
||||||
.expect("ixgbed: failed to allocate an interrupt vector");
|
|
||||||
|
|
||||||
println!(" + IXGBE {}", pci_config.func.display());
|
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 mapped_bar = unsafe { pcid_handle.map_bar(0) };
|
||||||
let address = mapped_bar.ptr.as_ptr();
|
let address = mapped_bar.ptr.as_ptr();
|
||||||
|
|||||||
Reference in New Issue
Block a user