From: Markus Theil Date: Fri, 13 Oct 2017 16:03:47 +0000 (+0200) Subject: igb_uio: fix legacy MSI masking X-Git-Tag: spdx-start~1321 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6f4600eba9f3d54bbd3474c2022a881bd32c1d16;p=dpdk.git igb_uio: fix legacy MSI masking 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 Tested-by: Markus Theil Acked-by: Ferruh Yigit --- diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 0dda26c7a6..b67d7750cf 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -122,13 +122,14 @@ igbuio_msi_mask_irq(struct pci_dev *pdev, struct msi_desc *desc, int32_t state) 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);