From: Alison Schofield <[email protected]>

The IDENTIFY mailbox command returns the partition alignment field
expressed in multiples of 256 MB. Use CXL_CAPACITY_MULTIPLIER when
returning this field.

This is in sync with all the other partitioning related fields using
the multiplier.

Signed-off-by: Alison Schofield <[email protected]>
---
 cxl/lib/libcxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cxl/lib/libcxl.c b/cxl/lib/libcxl.c
index 715d8e4..85a6c0e 100644
--- a/cxl/lib/libcxl.c
+++ b/cxl/lib/libcxl.c
@@ -1086,7 +1086,7 @@ CXL_EXPORT unsigned long long 
cxl_cmd_identify_get_partition_align(
        if (cmd->status < 0)
                return cmd->status;
 
-       return le64_to_cpu(id->partition_align);
+       return le64_to_cpu(id->partition_align) * CXL_CAPACITY_MULTIPLIER;
 }
 
 CXL_EXPORT unsigned int cxl_cmd_identify_get_label_size(struct cxl_cmd *cmd)
-- 
2.31.1


Reply via email to