Merge tag 'tpm-fixes-for-4.2-rc2' of https://github.com/PeterHuewe/linux-tpmdd into...
[firefly-linux-kernel-4.4.55.git] / include / target / target_core_base.h
index 8cb612613c10552ae81c0eda67bc2df72f9f7c2d..17ae2d6a4891e57245c16fbeb4e2a8a6462d32d0 100644 (file)
@@ -6,31 +6,21 @@
 #include <linux/dma-mapping.h>
 #include <linux/blkdev.h>
 #include <linux/percpu_ida.h>
-#include <scsi/scsi_cmnd.h>
 #include <net/sock.h>
 #include <net/tcp.h>
 
-#define TARGET_CORE_MOD_VERSION                "v4.1.0"
-#define TARGET_CORE_VERSION            TARGET_CORE_MOD_VERSION
+#define TARGET_CORE_VERSION            "v5.0"
 
 /*
- * By default we use 32-byte CDBs in TCM Core and subsystem plugin code.
- *
- * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and
- * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use
- * 16-byte CDBs by default and require an extra allocation for
- * 32-byte CDBs to because of legacy issues.
- *
- * Within TCM Core there are no such legacy limitiations, so we go ahead
- * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size()
- * within all TCM Core and subsystem plugin code.
+ * Maximum size of a CDB that can be stored in se_cmd without allocating
+ * memory dynamically for the CDB.
  */
 #define TCM_MAX_COMMAND_SIZE                   32
 /*
  * From include/scsi/scsi_cmnd.h:SCSI_SENSE_BUFFERSIZE, currently
  * defined 96, but the real limit is 252 (or 260 including the header)
  */
-#define TRANSPORT_SENSE_BUFFER                 SCSI_SENSE_BUFFERSIZE
+#define TRANSPORT_SENSE_BUFFER                 96
 /* Used by transport_send_check_condition_and_sense() */
 #define SPC_SENSE_KEY_OFFSET                   2
 #define SPC_ADD_SENSE_LEN_OFFSET               7
@@ -490,9 +480,8 @@ struct se_cmd {
        struct kref             cmd_kref;
        const struct target_core_fabric_ops *se_tfo;
        sense_reason_t          (*execute_cmd)(struct se_cmd *);
-       sense_reason_t          (*execute_rw)(struct se_cmd *, struct scatterlist *,
-                                             u32, enum dma_data_direction);
        sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool);
+       void                    *protocol_data;
 
        unsigned char           *t_task_cdb;
        unsigned char           __t_task_cdb[TCM_MAX_COMMAND_SIZE];
@@ -548,7 +537,6 @@ struct se_cmd {
 struct se_ua {
        u8                      ua_asc;
        u8                      ua_ascq;
-       struct se_node_acl      *ua_nacl;
        struct list_head        ua_nacl_list;
 };