Commit d9b104fa authored by Chengchang Tang's avatar Chengchang Tang
Browse files

RDMA/hns: Fix 1bit-ECC recovery address in non-4K OS

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAMO4D



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

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

Fixes: 1a8c6fa4 ("RDMA/hns: Recover 1bit-ECC error of RAM on chip")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent 78931130
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7014,7 +7014,7 @@ static u64 fmea_get_ram_res_addr(u32 res_type, __le64 *data)
	    res_type == ECC_RESOURCE_SCCC)
		return le64_to_cpu(*data);

	return le64_to_cpu(*data) << PAGE_SHIFT;
	return le64_to_cpu(*data) << HNS_HW_PAGE_SHIFT;
}

static int fmea_recover_others(struct hns_roce_dev *hr_dev, u32 res_type,