]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix 1bit-ECC recovery address in non-4K OS
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 6 Sep 2024 09:34:42 +0000 (17:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:34 +0000 (16:29 +0200)
commit288ecfd3e8aabc8a6d2303d0577e6627fdaf58fe
tree9650369be11791d6f35a2e203d0ef883f9c96daa
parent3ab289914eab74e80a70f61f8197b48d38e30ff9
RDMA/hns: Fix 1bit-ECC recovery address in non-4K OS

[ Upstream commit ce196f6297c7f3ab7780795e40efd6c521f60c8b ]

The 1bit-ECC recovery address read from HW only contain bits 64:12, so
it should be fixed left-shifted 12 bits when used.

Currently, the driver will shift the address left by PAGE_SHIFT when
used, which is wrong in non-4K OS.

Fixes: 2de949abd6a5 ("RDMA/hns: Recover 1bit-ECC error of RAM on chip")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20240906093444.3571619-8-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c