enable/disable PCI interrupts
Operating systems generally complain loudly about unexpected interrupts, because these are easily detectable programming errors in drivers.

Typically, your hardware would start in some fairly inert state after reset where it waits to be configured. In this state, there is no meaningful way to generate an interrupt, because there is no mapping established yet and you do not know which interrupt.

During configuration, the interrupt mapping comes into existence, and the card is told which interrupt line to use (INTA..INTD as legacy PCI, or MSI/MSI-X), but there is still no driver to handle interrupts yet. Linux has a default handler here that complains to the system log and then disables the interrupt source, as the hardware appears to be faulty (i.e. by default, all interrupts are enabled, but only those where a handler is registered are expected to actually occur).

The driver finally registers interrupt handlers and enables the interrupts it is interested in. If the driver is no longer interested in a specific condition, it needs to disable the interrupt in the device, because that is where the device specific interrupt causes are masked -- the lower layers only know that "something happened".