diff mbox series

[4/9] mpi3mr: Fix hibernation issue

Message ID 20220210095817.22828-5-sreekanth.reddy@broadcom.com
State New
Headers show
Series mpi3mr: Bug fixes | expand

Commit Message

Sreekanth Reddy Feb. 10, 2022, 9:58 a.m. UTC
Hibernation operation fails when it is issued for
second time. This is getting failed as driver is
trying to release IOC's PCI resources after
setting it's power state to D3 state.

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

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 3eac18b..43e5cc6 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;
 }