summaryrefslogtreecommitdiff
path: root/include/cxl
diff options
context:
space:
mode:
authorShiju Jose <shiju.jose@huawei.com>2025-02-20 12:42:42 -0700
committerDave Jiang <dave.jiang@intel.com>2025-02-26 08:51:31 -0700
commit5e5ac21f629de796ab5d598b59c5e468c6fe4f95 (patch)
treeeb44b19122181caefb09b6c652513685c7d37d3e /include/cxl
parent44818d387e55fa11476249783d14f925a269b196 (diff)
downloadlinux-5e5ac21f629de796ab5d598b59c5e468c6fe4f95.tar.gz
linux-5e5ac21f629de796ab5d598b59c5e468c6fe4f95.tar.bz2
linux-5e5ac21f629de796ab5d598b59c5e468c6fe4f95.zip
cxl/mbox: Add GET_FEATURE mailbox command
Add support for GET_FEATURE mailbox command. CXL spec r3.2 section 8.2.9.6 describes optional device specific features. The settings of a feature can be retrieved using Get Feature command. CXL spec r3.2 section 8.2.9.6.2 describes Get Feature command. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Li Ming <ming.li@zohomail.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Shiju Jose <shiju.jose@huawei.com> Link: https://patch.msgid.link/20250220194438.2281088-5-dave.jiang@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'include/cxl')
-rw-r--r--include/cxl/features.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cxl/features.h b/include/cxl/features.h
index 5b3485eb0f77..766c09978e5e 100644
--- a/include/cxl/features.h
+++ b/include/cxl/features.h
@@ -67,6 +67,29 @@ struct cxl_mbox_get_sup_feats_out {
struct cxl_feat_entry ents[] __counted_by_le(num_entries);
} __packed;
+/*
+ * Get Feature CXL spec r3.2 Spec 8.2.9.6.2
+ */
+
+/*
+ * Get Feature input payload
+ * CXL spec r3.2 section 8.2.9.6.2 Table 8-99
+ */
+struct cxl_mbox_get_feat_in {
+ uuid_t uuid;
+ __le16 offset;
+ __le16 count;
+ u8 selection;
+} __packed;
+
+/* Selection field for 'struct cxl_mbox_get_feat_in' */
+enum cxl_get_feat_selection {
+ CXL_GET_FEAT_SEL_CURRENT_VALUE,
+ CXL_GET_FEAT_SEL_DEFAULT_VALUE,
+ CXL_GET_FEAT_SEL_SAVED_VALUE,
+ CXL_GET_FEAT_SEL_MAX
+};
+
/**
* struct cxl_features_state - The Features state for the device
* @cxlds: Pointer to CXL device state
@@ -82,6 +105,7 @@ struct cxl_features_state {
} *entries;
};
+struct cxl_mailbox;
#ifdef CONFIG_CXL_FEATURES
inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds);
int devm_cxl_setup_features(struct cxl_dev_state *cxlds);