[PATCH] cxl/core/mbox: get next_persistent_bytes by next_persistent_cap

From: Huaisheng Ye
Date: Fri Dec 01 2023 - 11:39:38 EST


According to CXL 2.0 8.2.9.5.2.1 table 176, the next Persistent
Bytes should be calculated by next Persistent Capacity.

Signed-off-by: Huaisheng Ye <huaisheng.ye@xxxxxxxxx>
---
drivers/cxl/core/mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index 36270dcfb42e..7b8ec73ca37f 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -1069,7 +1069,7 @@ static int cxl_mem_get_partition_info(struct cxl_memdev_state *mds)
mds->next_volatile_bytes =
le64_to_cpu(pi.next_volatile_cap) * CXL_CAPACITY_MULTIPLIER;
mds->next_persistent_bytes =
- le64_to_cpu(pi.next_volatile_cap) * CXL_CAPACITY_MULTIPLIER;
+ le64_to_cpu(pi.next_persistent_cap) * CXL_CAPACITY_MULTIPLIER;

return 0;
}
--
2.39.0