[v1,4/5] scsi: ufs: fix auto-hibern8 error detection
diff mbox series

Message ID 20200124064926.29472-5-stanley.chu@mediatek.com
State New
Headers show
Series
  • MediaTek UFS vendor implemenation part III and Auto-Hibern8 fix
Related show

Commit Message

Stanley Chu Jan. 24, 2020, 6:49 a.m. UTC
If Auto-Hibern8 capability is supported by host but not actually
enabled, Auto-Hibern8 error shall not happen, thus bypass
disabling case in ufshcd_is_auto_hibern8_error().

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index abd0e6b05f79..214a3f373dd8 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5479,7 +5479,8 @@  static irqreturn_t ufshcd_update_uic_error(struct ufs_hba *hba)
 static bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba,
 					 u32 intr_mask)
 {
-	if (!ufshcd_is_auto_hibern8_supported(hba))
+	if (!ufshcd_is_auto_hibern8_supported(hba) ||
+	    !ufshcd_is_auto_hibern8_enabled(hba))
 		return false;
 
 	if (!(intr_mask & UFSHCD_UIC_HIBERN8_MASK))