aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/target/target_core_transport.c4
-rw-r--r--include/target/target_core_base.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 72c13b7a349f..e13fafa6f526 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -709,7 +709,7 @@ void transport_complete_task(struct se_task *task, int success)
709 if (dev && dev->transport->transport_complete) { 709 if (dev && dev->transport->transport_complete) {
710 if (dev->transport->transport_complete(task) != 0) { 710 if (dev->transport->transport_complete(task) != 0) {
711 cmd->se_cmd_flags |= SCF_TRANSPORT_TASK_SENSE; 711 cmd->se_cmd_flags |= SCF_TRANSPORT_TASK_SENSE;
712 task->task_sense = 1; 712 task->task_flags |= TF_HAS_SENSE;
713 success = 1; 713 success = 1;
714 } 714 }
715 } 715 }
@@ -2346,7 +2346,7 @@ static int transport_get_sense_data(struct se_cmd *cmd)
2346 2346
2347 list_for_each_entry_safe(task, task_tmp, 2347 list_for_each_entry_safe(task, task_tmp,
2348 &cmd->t_task_list, t_list) { 2348 &cmd->t_task_list, t_list) {
2349 if (!task->task_sense) 2349 if (!(task->task_flags & TF_HAS_SENSE))
2350 continue; 2350 continue;
2351 2351
2352 if (!dev->transport->get_sense_buffer) { 2352 if (!dev->transport->get_sense_buffer) {
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 1d90fb33e60b..7f3acdde97de 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -138,11 +138,12 @@ enum transport_tpg_type_table {
138 TRANSPORT_TPG_TYPE_DISCOVERY = 1, 138 TRANSPORT_TPG_TYPE_DISCOVERY = 1,
139}; 139};
140 140
141/* Used for generate timer flags */ 141/* struct se_task->task_flags */
142enum se_task_flags { 142enum se_task_flags {
143 TF_ACTIVE = (1 << 0), 143 TF_ACTIVE = (1 << 0),
144 TF_SENT = (1 << 1), 144 TF_SENT = (1 << 1),
145 TF_REQUEST_STOP = (1 << 2), 145 TF_REQUEST_STOP = (1 << 2),
146 TF_HAS_SENSE = (1 << 3),
146}; 147};
147 148
148/* Special transport agnostic struct se_cmd->t_states */ 149/* Special transport agnostic struct se_cmd->t_states */
@@ -488,7 +489,6 @@ struct se_task {
488 struct scatterlist *task_sg; 489 struct scatterlist *task_sg;
489 u32 task_sg_nents; 490 u32 task_sg_nents;
490 u16 task_flags; 491 u16 task_flags;
491 u8 task_sense;
492 u8 task_scsi_status; 492 u8 task_scsi_status;
493 int task_error_status; 493 int task_error_status;
494 enum dma_data_direction task_data_direction; 494 enum dma_data_direction task_data_direction;