summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpi3mr/mpi3mr_os.c
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>2022-02-10 15:28:12 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-11 17:40:03 -0500
commit191a3ef586344acc35ba5619d6225858250aaee5 (patch)
tree0361d6cdaec2dbb5bd87186a2a813d3161520664 /drivers/scsi/mpi3mr/mpi3mr_os.c
parent04b27e538d509f4b8947343bdf6b1421dc721f14 (diff)
scsi: mpi3mr: Fix hibernation issue
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>
Diffstat (limited to 'drivers/scsi/mpi3mr/mpi3mr_os.c')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index c932c2b6677f..40a8c2e21ef2 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -4473,8 +4473,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;
}