summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>2022-02-10 10:58:12 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-11 23:40:03 +0100
commit191a3ef586344acc35ba5619d6225858250aaee5 (patch)
tree0361d6cdaec2dbb5bd87186a2a813d3161520664
parentscsi: mpi3mr: Update MPI3 headers (diff)
downloadlinux-191a3ef586344acc35ba5619d6225858250aaee5.tar.xz
linux-191a3ef586344acc35ba5619d6225858250aaee5.zip
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>
-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;
}