MSI masks contain a 1 if interrupt is masked, 0 if unmasked.
I got that wrong with the !!state calculation. For better
readability, the mask is now changed like in igbuio_msi_mask_irq.
Fixes:
a8ea1e5fb647 ("igb_uio: fix unknown MSI symbols")
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Tested-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
u32 mask_bits = desc->masked;
u32 offset = desc->irq - pdev->irq;
u32 mask = 1 << offset;
- u32 flag = !!state << offset;
if (!desc->msi_attrib.maskbit)
return;
- mask_bits &= ~mask;
- mask_bits |= flag;
+ if (state != 0)
+ mask_bits &= ~mask;
+ else
+ mask_bits |= mask;
if (mask_bits != desc->masked) {
pci_write_config_dword(pdev, desc->mask_pos, mask_bits);