PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc()

71020a3c0d ("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: 71020a3c0d ("PCI/MSI: Use msi_add_msi_desc()")
Link: https://lore.kernel.org/r/d818f9c9-a432-213e-4152-eaff3b7da52e@oderland.se
Signed-off-by: Josef Johansson <josef@oderland.se>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Josef Johansson 2022-02-14 11:07:47 +01:00 коммит произвёл Bjorn Helgaas
Родитель 568035b01c
Коммит 2b96f92ca4
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -526,7 +526,7 @@ static int msix_setup_msi_descs(struct pci_dev *dev, void __iomem *base,
desc.pci.msi_attrib.can_mask = !pci_msi_ignore_mask &&
!desc.pci.msi_attrib.is_virtual;
if (!desc.pci.msi_attrib.can_mask) {
if (desc.pci.msi_attrib.can_mask) {
addr = pci_msix_desc_addr(&desc);
desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
}