title: Disable PCIe device asserting unknown interrupt
body: <p>I'm currently working on a PCIe-based Intel network card driver for my OS development project. While the driver seems to be working well, as soon as I enable INTA (IRQ 16, using the I/O APIC) I keep getting a flood of interrupts which completely blocks my kernel. These are not caused by the network card (Interrupt Cause Register is all zeroes), except in very few cases where the card actually received a packet.</p>
  
  <p><strong>Things I have tried:</strong></p>
  
  <ul>
  <li><p>Test other IRQ trigger settings - level-triggered on "low" should be correct, since in other cases nothing happens at all (network card interrupts should work).</p></li>
  <li><p>Disable all other PCIe devices: I tried writing 0x0400 into each device's <a href="https://wiki.osdev.org/PCI#PCI_Device_Structure" rel="nofollow noreferrer">PCIe cfg space command register</a> (set the interrupt disable flag, clear all other flags); I only excluded the network card, the video card and bridge devices. Although that operation succeeds, I am not entirely sure that this really disables the given devices, since those interrupts still occur.</p></li>
  </ul>
  
  <p>Is writing 0x0400 to the command register the proper way to completely disable a PCIe device?</p>