]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs: core: WLUN suspend dev/link state error recovery
authorPeter Wang <peter.wang@mediatek.com>
Fri, 29 Mar 2024 01:50:36 +0000 (09:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:14:40 +0000 (12:14 +0200)
commit815d04b1d60cf5da16276f5f69ad4d8c663f4d36
tree9f1a365abbab8ef2ae0291f738b316943aafe5ed
parent184ed036ede16f4eb2009f3c0afa0c11a465d686
scsi: ufs: core: WLUN suspend dev/link state error recovery

[ Upstream commit 6bc5e70b1c792b31b497e48b4668a9a2909aca0d ]

When wl suspend error occurs, for example BKOP or SSU timeout, the host
triggers an error handler and returns -EBUSY to break the wl suspend
process.  However, it is possible for the runtime PM to enter wl suspend
again before the error handler has finished, and return -EINVAL because the
device is in an error state. To address this, ensure that the rumtime PM
waits for the error handler to finish, or trigger the error handler in such
cases, because returning -EINVAL can cause the I/O to hang.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20240329015036.15707-1-peter.wang@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/core/ufshcd.c