PA Layer issues a LINERESET to the PHY at the recovery step in the Power Mode change operation. If it happens during auto or mannual hibern8 enter, even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode and kept in that mode after exit from hibern8, leading to bad performance. Handle the LINERESET in the eh_work by restoring power mode to HS mode after all pending reqs and tasks are cleared from doorbell. Can Guo (2): scsi: ufs: Abort tasks before clear them from doorbell scsi: ufs: Handle LINERESET indication in err handler drivers/scsi/ufs/ufshcd.c | 254 ++++++++++++++++++++++++++++++++-------------- drivers/scsi/ufs/ufshcd.h | 2 + drivers/scsi/ufs/ufshci.h | 1 + drivers/scsi/ufs/unipro.h | 3 + 4 files changed, 184 insertions(+), 76 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.