aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorSubhash Jadavani <[email protected]>2019-11-14 22:09:30 -0800
committerMartin K. Petersen <[email protected]>2019-11-19 21:37:32 -0500
commit6d303e4b19d694cdbebf76bcdb51ada664ee953d (patch)
treef261c501808f01e5d484a982360f191e4883b65f /drivers/usb/cdns3/cdns3-imx.c
parent18f01374b55b4595ad7f56250891bdbdb9d7a052 (diff)
scsi: ufs: Fix error handing during hibern8 enter
During clock gating (ufshcd_gate_work()), we first put the link hibern8 by calling ufshcd_uic_hibern8_enter() and if ufshcd_uic_hibern8_enter() returns success (0) then we gate all the clocks. Now let’s zoom in to what ufshcd_uic_hibern8_enter() does internally: It calls __ufshcd_uic_hibern8_enter() and if failure is encountered, link recovery shall put the link back to the highest HS gear and returns success (0) to ufshcd_uic_hibern8_enter() which is the issue as link is still in active state due to recovery! Now ufshcd_uic_hibern8_enter() returns success to ufshcd_gate_work() and hence it goes ahead with gating the UFS clock while link is still in active state hence I believe controller would raise UIC error interrupts. But when we service the interrupt, clocks might have already been disabled! This change fixes for this by returning failure from __ufshcd_uic_hibern8_enter() if recovery succeeds as link is still not in hibern8, upon receiving the error ufshcd_hibern8_enter() would initiate retry to put the link state back into hibern8. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Subhash Jadavani <[email protected]> Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions