]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: mpi3mr: Fix hibernation issue
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Thu, 10 Feb 2022 09:58:12 +0000 (15:28 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:42:02 +0000 (14:42 +0200)
BugLink: https://bugs.launchpad.net/bugs/1967116
Hibernation operation fails when it is issued for second time. This is
because the driver is trying to release the IOC's PCI resources after
setting power state to D3.

Set the IOC's power state to D3 only after releasing the IOC's PCI
resources.

Link: https://lore.kernel.org/r/20220210095817.22828-5-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 191a3ef586344acc35ba5619d6225858250aaee5 linux-next)
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/scsi/mpi3mr/mpi3mr_os.c

index c4ee8a43abaac0fb77b459041d9966c7efcdff36..acae7660f62bc206f5f6ef88bca255bc4c2a94f7 100644 (file)
@@ -4475,8 +4475,8 @@ static int mpi3mr_suspend(struct pci_dev *pdev, pm_message_t state)
        ioc_info(mrioc, "pdev=0x%p, slot=%s, entering operating state [D%d]\n",
            pdev, pci_name(pdev), device_state);
        pci_save_state(pdev);
-       pci_set_power_state(pdev, device_state);
        mpi3mr_cleanup_resources(mrioc);
+       pci_set_power_state(pdev, device_state);
 
        return 0;
 }