Commit 5e576f9f authored by Marek Behún's avatar Marek Behún Committed by Zheng Zengkai
Browse files

firmware: turris-mox-rwtm: fix reply status decoding function

stable inclusion
from stable-5.10.52
commit 271c12dbeb62e53b10d45fe904b3dc7afb779aae
bugzilla: 175542 https://gitee.com/openeuler/kernel/issues/I4DTKU

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=271c12dbeb62e53b10d45fe904b3dc7afb779aae



--------------------------------

[ Upstream commit e34e6025 ]

The status decoding function mox_get_status() currently contains an
incorrect check: if the error status is not MBOX_STS_SUCCESS, it always
returns -EIO, so the comparison to MBOX_STS_FAIL is never executed and
we don't get the actual error code sent by the firmware.

Fix this.

Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Reviewed-by: default avatarPali Rohár <pali@kernel.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Fixes: 389711b3 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 36150bb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment