On 10/21/24 8:18 PM, Davidlohr Bueso wrote:
+static inline bool cxl_is_background_cmd(u16 opcode)
+{
+ switch (opcode) {
+ case CXL_MBOX_OP_TRANSFER_FW:
+ case CXL_MBOX_OP_ACTIVATE_FW:
+ case CXL_MBOX_OP_SCAN_MEDIA:
+ case CXL_MBOX_OP_SANITIZE:
+ return true;
+ default:
+ return false;
+ }
+}
Should this information be pulled from the CEL entry? We should add the code to store the 'command effect' field when walking the CEL and store this information for each command. And then we can just check bit6 of the field rather than statically program that in the kernel.