]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: fix Auto-Hibern8 error detection
authorStanley Chu <stanley.chu@mediatek.com>
Wed, 29 Jan 2020 10:52:50 +0000 (18:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:19 +0000 (10:50 +0200)
commit3a5b19a5f0c963dac8660b8a037311de9a72d69d
tree14fd96f8ab77b9daa6f4a45511957885f8dff3ad
parente0d3bb5df4340571f46103671ea3d9203dab7084
scsi: ufs: fix Auto-Hibern8 error detection

commit f684428e67b318c75f5e95b3ea9d92e26b75798f upstream.

Auto-Hibern8 may be disabled by some vendors or sysfs in runtime even if
Auto-Hibern8 capability is supported by host. If Auto-Hibern8 capability is
supported by host but not actually enabled, Auto-Hibern8 error shall not
happen.

To fix this, provide a way to detect if Auto-Hibern8 is actually enabled
first, and bypass Auto-Hibern8 disabling case in
ufshcd_is_auto_hibern8_error().

Fixes: 820b41f83cdf ("scsi: ufs: Add error-handling of Auto-Hibernate")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200129105251.12466-4-stanley.chu@mediatek.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h