Blame sedutil-1.15.1-nvme_ioctl.patch

Charles R. Anderson 3a41e8
diff -up sedutil-1.15.1/linux/DtaDevLinuxNvme.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvme.h
Charles R. Anderson 3a41e8
--- sedutil-1.15.1/linux/DtaDevLinuxNvme.h.nvme_ioctl	2017-08-21 20:28:11.000000000 -0400
Charles R. Anderson 3a41e8
+++ sedutil-1.15.1/linux/DtaDevLinuxNvme.h	2018-03-02 22:54:20.882144312 -0500
Charles R. Anderson 3a41e8
@@ -19,8 +19,9 @@ along with sedutil.  If not, see 
Charles R. Anderson 910c16
  * C:E********************************************************************** */
Charles R. Anderson 910c16
 #pragma once
Charles R. Anderson 3a41e8
 #include <linux/version.h>
Charles R. Anderson 3a41e8
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
Charles R. Anderson a976e1
+#if 1 || (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
Charles R. Anderson 3a41e8
 #include <linux/nvme_ioctl.h>
Charles R. Anderson 910c16
+#include "DtaDevLinuxNvmeStructsOpCodes.h"
Charles R. Anderson 3a41e8
 #else
Charles R. Anderson 3a41e8
 #include <linux/nvme.h>
Charles R. Anderson 3a41e8
 #endif
Charles R. Anderson 3a41e8
diff -up sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h.nvme_ioctl sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h
Charles R. Anderson 3a41e8
--- sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h.nvme_ioctl	2018-03-02 22:51:13.255083016 -0500
Charles R. Anderson 3a41e8
+++ sedutil-1.15.1/linux/DtaDevLinuxNvmeStructsOpCodes.h	2018-03-02 22:51:13.255083016 -0500
Charles R. Anderson 910c16
@@ -0,0 +1,95 @@
Charles R. Anderson 910c16
+/*
Charles R. Anderson 910c16
+ * Definitions for the NVM Express interface
Charles R. Anderson 910c16
+ * Copyright (c) 2011-2014, Intel Corporation.
Charles R. Anderson 910c16
+ *
Charles R. Anderson 910c16
+ * This program is free software; you can redistribute it and/or modify it
Charles R. Anderson 910c16
+ * under the terms and conditions of the GNU General Public License,
Charles R. Anderson 910c16
+ * version 2, as published by the Free Software Foundation.
Charles R. Anderson 910c16
+ *
Charles R. Anderson 910c16
+ * This program is distributed in the hope it will be useful, but WITHOUT
Charles R. Anderson 910c16
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Charles R. Anderson 910c16
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
Charles R. Anderson 910c16
+ * more details.
Charles R. Anderson 910c16
+ */
Charles R. Anderson 910c16
+#pragma once
Charles R. Anderson 910c16
+
Charles R. Anderson 910c16
+enum nvme_admin_opcode {
Charles R. Anderson 910c16
+        nvme_admin_delete_sq            = 0x00,
Charles R. Anderson 910c16
+        nvme_admin_create_sq            = 0x01,
Charles R. Anderson 910c16
+        nvme_admin_get_log_page         = 0x02,
Charles R. Anderson 910c16
+        nvme_admin_delete_cq            = 0x04,
Charles R. Anderson 910c16
+        nvme_admin_create_cq            = 0x05,
Charles R. Anderson 910c16
+        nvme_admin_identify             = 0x06,
Charles R. Anderson 910c16
+        nvme_admin_abort_cmd            = 0x08,
Charles R. Anderson 910c16
+        nvme_admin_set_features         = 0x09,
Charles R. Anderson 910c16
+        nvme_admin_get_features         = 0x0a,
Charles R. Anderson 910c16
+        nvme_admin_async_event          = 0x0c,
Charles R. Anderson 910c16
+        nvme_admin_activate_fw          = 0x10,
Charles R. Anderson 910c16
+        nvme_admin_download_fw          = 0x11,
Charles R. Anderson 910c16
+        nvme_admin_format_nvm           = 0x80,
Charles R. Anderson 910c16
+        nvme_admin_security_send        = 0x81,
Charles R. Anderson 910c16
+        nvme_admin_security_recv        = 0x82,
Charles R. Anderson 910c16
+};
Charles R. Anderson 910c16
+
Charles R. Anderson 910c16
+struct nvme_id_power_state {
Charles R. Anderson 910c16
+        __le16                  max_power;      /* centiwatts */
Charles R. Anderson 910c16
+        __u8                    rsvd2;
Charles R. Anderson 910c16
+        __u8                    flags;
Charles R. Anderson 910c16
+        __le32                  entry_lat;      /* microseconds */
Charles R. Anderson 910c16
+        __le32                  exit_lat;       /* microseconds */
Charles R. Anderson 910c16
+        __u8                    read_tput;
Charles R. Anderson 910c16
+        __u8                    read_lat;
Charles R. Anderson 910c16
+        __u8                    write_tput;
Charles R. Anderson 910c16
+        __u8                    write_lat;
Charles R. Anderson 910c16
+        __le16                  idle_power;
Charles R. Anderson 910c16
+        __u8                    idle_scale;
Charles R. Anderson 910c16
+        __u8                    rsvd19;
Charles R. Anderson 910c16
+        __le16                  active_power;
Charles R. Anderson 910c16
+        __u8                    active_work_scale;
Charles R. Anderson 910c16
+        __u8                    rsvd23[9];
Charles R. Anderson 910c16
+};
Charles R. Anderson 910c16
+
Charles R. Anderson 910c16
+struct nvme_id_ctrl {
Charles R. Anderson 910c16
+        __le16                  vid;
Charles R. Anderson 910c16
+        __le16                  ssvid;
Charles R. Anderson 910c16
+        char                    sn[20];
Charles R. Anderson 910c16
+        char                    mn[40];
Charles R. Anderson 910c16
+        char                    fr[8];
Charles R. Anderson 910c16
+        __u8                    rab;
Charles R. Anderson 910c16
+        __u8                    ieee[3];
Charles R. Anderson 910c16
+        __u8                    mic;
Charles R. Anderson 910c16
+        __u8                    mdts;
Charles R. Anderson 910c16
+        __le16                  cntlid;
Charles R. Anderson 910c16
+        __le32                  ver;
Charles R. Anderson 910c16
+        __u8                    rsvd84[172];
Charles R. Anderson 910c16
+        __le16                  oacs;
Charles R. Anderson 910c16
+        __u8                    acl;
Charles R. Anderson 910c16
+        __u8                    aerl;
Charles R. Anderson 910c16
+        __u8                    frmw;
Charles R. Anderson 910c16
+        __u8                    lpa;
Charles R. Anderson 910c16
+        __u8                    elpe;
Charles R. Anderson 910c16
+        __u8                    npss;
Charles R. Anderson 910c16
+        __u8                    avscc;
Charles R. Anderson 910c16
+        __u8                    apsta;
Charles R. Anderson 910c16
+        __le16                  wctemp;
Charles R. Anderson 910c16
+        __le16                  cctemp;
Charles R. Anderson 910c16
+        __u8                    rsvd270[242];
Charles R. Anderson 910c16
+        __u8                    sqes;
Charles R. Anderson 910c16
+        __u8                    cqes;
Charles R. Anderson 910c16
+        __u8                    rsvd514[2];
Charles R. Anderson 910c16
+        __le32                  nn;
Charles R. Anderson 910c16
+        __le16                  oncs;
Charles R. Anderson 910c16
+        __le16                  fuses;
Charles R. Anderson 910c16
+        __u8                    fna;
Charles R. Anderson 910c16
+        __u8                    vwc;
Charles R. Anderson 910c16
+        __le16                  awun;
Charles R. Anderson 910c16
+        __le16                  awupf;
Charles R. Anderson 910c16
+        __u8                    nvscc;
Charles R. Anderson 910c16
+        __u8                    rsvd531;
Charles R. Anderson 910c16
+        __le16                  acwu;
Charles R. Anderson 910c16
+        __u8                    rsvd534[2];
Charles R. Anderson 910c16
+        __le32                  sgls;
Charles R. Anderson 910c16
+        __u8                    rsvd540[1508];
Charles R. Anderson 910c16
+        struct nvme_id_power_state      psd[32];
Charles R. Anderson 910c16
+        __u8                    vs[1024];
Charles R. Anderson 910c16
+};