diff mbox series

[v2,4/5] scsi: ufs: fix auto-hibern8 error detection

Message ID 20200124150743.15110-5-stanley.chu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series MediaTek UFS vendor implemenation part III and Auto-Hibern8 fix | expand

Commit Message

Stanley Chu Jan. 24, 2020, 3:07 p.m. UTC
If Auto-Hibern8 capability is supported by host but not actually
enabled, Auto-Hibern8 error shall not happen. Thus bypass
Auto-Hibern8 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(-)

Comments

Bean Huo Jan. 28, 2020, 3:52 p.m. UTC | #1
Hi, Stanley 
Do you think it is necessary to add fixes tag, and combine this patch with previous patch to
single patch?  That will be easier to down port to the older kernel.

> 
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Stanley Chu Jan. 29, 2020, 6:33 a.m. UTC | #2
Hi Bean,

On Tue, 2020-01-28 at 15:52 +0000, Bean Huo (beanhuo) wrote:
> Hi, Stanley 
> Do you think it is necessary to add fixes tag, and combine this patch with previous patch to
> single patch?  That will be easier to down port to the older kernel.

OK! I will update this patch according to your suggestions in next
version.

Thanks,
Stanley
diff mbox series

Patch

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))