Skip to content

Commit 2b96f92

Browse files
isodudebjorn-helgaas
authored andcommitted
PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc()
71020a3 ("PCI/MSI: Use msi_add_msi_desc()") inadvertently reversed the sense of "msi_attrib.can_mask" in one use: - if (entry->pci.msi_attrib.can_mask) { - addr = pci_msix_desc_addr(entry); - entry->pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL); + if (!desc.pci.msi_attrib.can_mask) { + addr = pci_msix_desc_addr(&desc); + desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL); Restore the original test. [bhelgaas: commit log] Fixes: 71020a3 ("PCI/MSI: Use msi_add_msi_desc()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Josef Johansson <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]>
1 parent 568035b commit 2b96f92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/msi/msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ static int msix_setup_msi_descs(struct pci_dev *dev, void __iomem *base,
526526
desc.pci.msi_attrib.can_mask = !pci_msi_ignore_mask &&
527527
!desc.pci.msi_attrib.is_virtual;
528528

529-
if (!desc.pci.msi_attrib.can_mask) {
529+
if (desc.pci.msi_attrib.can_mask) {
530530
addr = pci_msix_desc_addr(&desc);
531531
desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
532532
}

0 commit comments

Comments
 (0)