Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55cf5fda authored by Dolev Raviv's avatar Dolev Raviv
Browse files

scsi: ufs: fix ufs error on shoutdown



When running with a UFS controller but without a UFS device,
there are errors on shoutdown. This is because the device
state variable was not initialized before shutdown.
To solve it the device state is initialized to power off.

Change-Id: I89a9def0ed399907896d1492b7f592fc928be260
Signed-off-by: default avatarDolev Raviv <draviv@codeaurora.org>
parent 2d37de8c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6012,6 +6012,12 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
	/* Hold auto suspend until async scan completes */
	pm_runtime_get_sync(dev);

	/*
	 * The device-initialize-sequence hasn't been invoked yet.
	 * Set the device to power-off state
	 */
	ufshcd_set_ufs_dev_poweroff(hba);

	async_schedule(ufshcd_async_scan, hba);

	UFSDBG_ADD_DEBUGFS(hba)