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

Commit 0eebfea0 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

scsi: ufs: mark device and link state if probe fails



It seems UFS device state is set to active during probe and it doesn't get
set to off even after probe fails. Because of this UFS device regulators
aren't getting voted off. So mark both device and link state to off if
probe fails which should vote off resources.

Change-Id: I85f193acbf6054223bb300098c719061759667a1
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 3faf7157
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -7833,6 +7833,11 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
		ufshcd_set_auto_hibern8_timer(hba,
				      hba->hibern8_on_idle.delay_ms);
out:
	if (ret) {
		ufshcd_set_ufs_dev_poweroff(hba);
		ufshcd_set_link_off(hba);
	}

	/*
	 * If we failed to initialize the device or the device is not
	 * present, turn off the power/clocks etc.