diff options
author | Asutosh Das <asutoshd@codeaurora.org> | 2017-01-31 15:55:17 +0530 |
---|---|---|
committer | Asutosh Das <asutoshd@codeaurora.org> | 2017-02-16 16:17:40 +0530 |
commit | a723713f60c83eb1964cf326214a4b9b54e077c1 (patch) | |
tree | 05b12aaa1d8a3604254210c40696e1caea78903a /drivers/scsi | |
parent | a66dbe84845ba61b2d6bd7eb95bed592cf60e824 (diff) |
scsi: ufs: full reinit upon resume if link was off
During suspend, if the link is put to off, it would require
a full initialization during resume.
This patch resets and restores both the hba and the card
during initialization.
Change-Id: I37b36c51ca1b475d8f8dfd2d9b1f098c917c86e4
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index f5d7cd0f4701..c891fc8d34a3 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -8603,9 +8603,13 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) goto vendor_suspend; } } else if (ufshcd_is_link_off(hba)) { - ret = ufshcd_host_reset_and_restore(hba); /* - * ufshcd_host_reset_and_restore() should have already + * A full initialization of the host and the device is required + * since the link was put to off during suspend. + */ + ret = ufshcd_reset_and_restore(hba); + /* + * ufshcd_reset_and_restore() should have already * set the link state as active */ if (ret || !ufshcd_is_link_active(hba)) |