]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
PCI/MSI: Correct misleading comments
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jul 2021 21:51:45 +0000 (23:51 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 10:27:36 +0000 (12:27 +0200)
BugLink: https://bugs.launchpad.net/bugs/1944202
commit 689e6b5351573c38ccf92a0dd8b3e2c2241e4aff upstream.

The comments about preserving the cached state in pci_msi[x]_shutdown() are
misleading as the MSI descriptors are freed right after those functions
return. So there is nothing to restore. Preparatory change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210729222542.621609423@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/pci/msi.c

index ad5610fb1577e670e5744082970449c672aa38ad..4504b94d4be72b0137da1d9ef2c18e09753d0ba2 100644 (file)
@@ -960,7 +960,6 @@ static void pci_msi_shutdown(struct pci_dev *dev)
 
        /* Return the device with MSI unmasked as initial states */
        mask = msi_mask(desc->msi_attrib.multi_cap);
-       /* Keep cached state to be restored */
        __pci_msi_desc_mask_irq(desc, mask, 0);
 
        /* Restore dev->irq to its default pin-assertion IRQ */
@@ -1046,10 +1045,8 @@ static void pci_msix_shutdown(struct pci_dev *dev)
        }
 
        /* Return the device with MSI-X masked as initial states */
-       for_each_pci_msi_entry(entry, dev) {
-               /* Keep cached states to be restored */
+       for_each_pci_msi_entry(entry, dev)
                __pci_msix_desc_mask_irq(entry, 1);
-       }
 
        pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0);
        pci_intx_for_msi(dev, 1);