summaryrefslogtreecommitdiff
path: root/include/uapi/scsi
diff options
context:
space:
mode:
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>2017-06-21 21:15:42 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-26 15:01:11 -0400
commitd6e32f530df9827070c45b55a6c67dfa8562184c (patch)
tree5ead64979c391a2db924f33effcd02776196cc8c /include/uapi/scsi
parentcf2430279006e4afa67dfa4cf952ded38c7ed5b4 (diff)
scsi: cxlflash: Introduce host ioctl support
As staging for supporting various host management functions, add a host ioctl infrastructure to filter ioctl commands and perform operations that are common for all host ioctls. Also update the cxlflash documentation to create a new section for documenting host ioctls. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/uapi/scsi')
-rw-r--r--include/uapi/scsi/cxlflash_ioctl.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/include/uapi/scsi/cxlflash_ioctl.h b/include/uapi/scsi/cxlflash_ioctl.h
index e9fdc12ad984..87e1f63029bf 100644
--- a/include/uapi/scsi/cxlflash_ioctl.h
+++ b/include/uapi/scsi/cxlflash_ioctl.h
@@ -31,7 +31,7 @@ struct dk_cxlflash_hdr {
};
/*
- * Return flag definitions available to all ioctls
+ * Return flag definitions available to all superpipe ioctls
*
* Similar to the input flags, these are grown from the bottom-up with the
* intention that ioctl-specific return flag definitions would grow from the
@@ -180,6 +180,10 @@ union cxlflash_ioctls {
#define CXL_MAGIC 0xCA
#define CXL_IOWR(_n, _s) _IOWR(CXL_MAGIC, _n, struct _s)
+/*
+ * CXL Flash superpipe ioctls start at base of the reserved CXL_MAGIC
+ * region (0x80) and grow upwards.
+ */
#define DK_CXLFLASH_ATTACH CXL_IOWR(0x80, dk_cxlflash_attach)
#define DK_CXLFLASH_USER_DIRECT CXL_IOWR(0x81, dk_cxlflash_udirect)
#define DK_CXLFLASH_RELEASE CXL_IOWR(0x82, dk_cxlflash_release)
@@ -191,4 +195,29 @@ union cxlflash_ioctls {
#define DK_CXLFLASH_VLUN_RESIZE CXL_IOWR(0x88, dk_cxlflash_resize)
#define DK_CXLFLASH_VLUN_CLONE CXL_IOWR(0x89, dk_cxlflash_clone)
+/*
+ * Structure and flag definitions CXL Flash host ioctls
+ */
+
+#define HT_CXLFLASH_VERSION_0 0
+
+struct ht_cxlflash_hdr {
+ __u16 version; /* Version data */
+ __u16 subcmd; /* Sub-command */
+ __u16 rsvd[2]; /* Reserved for future use */
+ __u64 flags; /* Input flags */
+ __u64 return_flags; /* Returned flags */
+};
+
+union cxlflash_ht_ioctls {
+};
+
+#define MAX_HT_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ht_ioctls))
+
+/*
+ * CXL Flash host ioctls start at the top of the reserved CXL_MAGIC
+ * region (0xBF) and grow downwards.
+ */
+
+
#endif /* ifndef _CXLFLASH_IOCTL_H */