Merge tag 'wireless-drivers-for-davem-2017-04-03' of git://git.kernel.org/pub/scm...
[linux-2.6-block.git] / include / target / target_core_base.h
index 8be9ba73383d52eba83cc50d7bb55451eb9589b3..4b784b6e21c0d9cb533b31997883d7dd447343bf 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/configfs.h>      /* struct config_group */
 #include <linux/dma-direction.h> /* enum dma_data_direction */
 #include <linux/percpu_ida.h>    /* struct percpu_ida */
+#include <linux/percpu-refcount.h>
 #include <linux/semaphore.h>     /* struct semaphore */
 #include <linux/completion.h>
 
@@ -198,6 +199,7 @@ enum tcm_tmreq_table {
        TMR_LUN_RESET           = 5,
        TMR_TARGET_WARM_RESET   = 6,
        TMR_TARGET_COLD_RESET   = 7,
+       TMR_UNKNOWN             = 0xff,
 };
 
 /* fabric independent task management response values */
@@ -297,7 +299,7 @@ struct t10_alua_tg_pt_gp {
        struct list_head tg_pt_gp_lun_list;
        struct se_lun *tg_pt_gp_alua_lun;
        struct se_node_acl *tg_pt_gp_alua_nacl;
-       struct delayed_work tg_pt_gp_transition_work;
+       struct work_struct tg_pt_gp_transition_work;
        struct completion *tg_pt_gp_transition_complete;
 };
 
@@ -398,7 +400,6 @@ struct se_tmr_req {
        void                    *fabric_tmr_ptr;
        struct se_cmd           *task_cmd;
        struct se_device        *tmr_dev;
-       struct se_lun           *tmr_lun;
        struct list_head        tmr_list;
 };
 
@@ -489,8 +490,6 @@ struct se_cmd {
 #define CMD_T_COMPLETE         (1 << 2)
 #define CMD_T_SENT             (1 << 4)
 #define CMD_T_STOP             (1 << 5)
-#define CMD_T_DEV_ACTIVE       (1 << 7)
-#define CMD_T_BUSY             (1 << 9)
 #define CMD_T_TAS              (1 << 10)
 #define CMD_T_FABRIC_STOP      (1 << 11)
        spinlock_t              t_state_lock;
@@ -733,6 +732,7 @@ struct se_lun {
        struct config_group     lun_group;
        struct se_port_stat_grps port_stat_grps;
        struct completion       lun_ref_comp;
+       struct completion       lun_shutdown_comp;
        struct percpu_ref       lun_ref;
        struct list_head        lun_dev_link;
        struct hlist_node       link;
@@ -768,6 +768,8 @@ struct se_device {
        u32                     dev_index;
        u64                     creation_time;
        atomic_long_t           num_resets;
+       atomic_long_t           aborts_complete;
+       atomic_long_t           aborts_no_task;
        atomic_long_t           num_cmds;
        atomic_long_t           read_bytes;
        atomic_long_t           write_bytes;