Commit 191a3ef5 authored by Sreekanth Reddy's avatar Sreekanth Reddy Committed by Martin K. Petersen
Browse files

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: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 04b27e53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}