]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 13 Nov 2025 04:52:55 +0000 (12:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:06 +0000 (14:03 +0100)
commit638779b175216840e321319bd371ff89fdcd5e56
treee49c504de87d1273712bc16020c093d8bb11f3a9
parentf4b45dc5eeb3d5ae3b80566692a27256ba707140
scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify

[ Upstream commit b0ee72db9132bd19b1b80152b35e0cf6a6cbd9f2 ]

This fixes the dme-reset failed when doing recovery. Because device
reset is not enough, we could occasionally see the error below:

ufshcd-rockchip 2a2d0000.ufs: uic cmd 0x14 with arg3 0x0 completion timeout
ufshcd-rockchip 2a2d0000.ufs: dme-reset: error code -110
ufshcd-rockchip 2a2d0000.ufs: DME_RESET failed
ufshcd-rockchip 2a2d0000.ufs: ufshcd_host_reset_and_restore: Host init failed -110

Fix this by resetting the controller on PRE_CHANGE stage of hce enable
notify.

Fixes: d3cbe455d6eb ("scsi: ufs: rockchip: Initial support for UFS")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://patch.msgid.link/1763009575-237552-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/host/ufs-rockchip.c