diff mbox series

[RFC,2/3] cxl/mbox: Update sanitize opcode support

Message ID 20230922130557.3476469-1-jtp.park@samsung.com
State New, archived
Headers show
Series cxl: Fix background operation handling | expand

Commit Message

Jeongtae Park Sept. 22, 2023, 1:05 p.m. UTC
This patch adds bgmode to the existing sanitize command.
By adding it, the sanitize operation will work the same as before.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Hojin Nam <hj96.nam@samsung.com>
---
 drivers/cxl/core/mbox.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index d6d067fbee97..2a7c12950a1e 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -1106,7 +1106,10 @@  int cxl_mem_sanitize(struct cxl_memdev_state *mds, u16 cmd)
 		.payload_out = &out,
 		.size_out = sizeof(out),
 	};
-	struct cxl_mbox_cmd mbox_cmd = { .opcode = cmd };
+	struct cxl_mbox_cmd mbox_cmd = {
+		.opcode = cmd,
+		.bg_mode = CXL_BG_CMD_ASYNC_INT,
+	};
 	struct cxl_dev_state *cxlds = &mds->cxlds;
 
 	if (cmd != CXL_MBOX_OP_SANITIZE && cmd != CXL_MBOX_OP_SECURE_ERASE)