diff --git a/drivers/net/ixgbed/src/main.rs b/drivers/net/ixgbed/src/main.rs index f16c7f9077..c0d509264f 100644 --- a/drivers/net/ixgbed/src/main.rs +++ b/drivers/net/ixgbed/src/main.rs @@ -19,10 +19,14 @@ 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 - .legacy_interrupt_line - .expect("ixgbed: no legacy interrupts supported"); + .pci_allocate_interrupt_vector(1) + .expect("ixgbed: failed to allocate an interrupt vector"); println!(" + IXGBE {}", pci_config.func.display()); @@ -74,9 +78,6 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! { let mut irq = [0; 8]; irq_file.read(&mut irq).unwrap(); let ours = scheme.adapter().irq(); - // The kernel masks the IRQ line on delivery and only re-arms - // it on write-back; ack unconditionally or a foreign interrupt - // on a shared line leaves the line masked forever. irq_file.write(&mut irq).unwrap(); if ours {