diff options
author | Stanley Chu <stanley.chu@mediatek.com> | 2020-03-27 17:53:29 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-03-29 18:10:58 -0400 |
commit | 8033824bbf3c15e6321045a3f51d6f6947d89d47 (patch) | |
tree | 54b9bba27ee37a5ecb14ba664757543acb9e37b0 /drivers/target | |
parent | 087c5efafa48661ac98184fbf8826a1a79dc5784 (diff) | |
download | linux-stable-8033824bbf3c15e6321045a3f51d6f6947d89d47.tar.gz linux-stable-8033824bbf3c15e6321045a3f51d6f6947d89d47.tar.bz2 linux-stable-8033824bbf3c15e6321045a3f51d6f6947d89d47.zip |
scsi: ufs-mediatek: add error recovery for suspend and resume
Once fail happens during suspend and resume flow if the desired low power
link state is H8, link recovery is required for MediaTek UFS controller.
For resume flow, since power and clocks are already enabled before invoking
vendor's resume callback, simply using ufshcd_link_recovery() inside
callback is fine.
For suspend flow, the device power enters low power mode or is disabled
before suspend callback, thus ufshcd_link_recovery() can not be directly
used in vendor callback. One solution is to set the link to off state and
then ufshcd_host_reset_and_restore() will be executed by ufshcd_suspend().
Link: https://lore.kernel.org/r/20200327095329.10083-3-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
0 files changed, 0 insertions, 0 deletions