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: Dolev Raviv <draviv@codeaurora.org>
This commit is contained in:
Dolev Raviv
2014-01-24 05:51:23 -08:00
committed by Bryan Huntsman
parent 5378652bad
commit 88196b3601
+6
View File
@@ -1773,6 +1773,12 @@ int ufshcd_init(struct device *dev, struct ufs_hba **hba_handle,
*hba_handle = hba;
/*
* 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);
return 0;