diff options
-rw-r--r-- | drivers/target/target_core_transport.c | 7 | ||||
-rw-r--r-- | include/target/target_core_base.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index a6e1edcfefbd..42c2a44b83dd 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -1827,6 +1827,8 @@ static bool target_handle_task_attr(struct se_cmd *cmd) | |||
1827 | if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) | 1827 | if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) |
1828 | return false; | 1828 | return false; |
1829 | 1829 | ||
1830 | cmd->se_cmd_flags |= SCF_TASK_ATTR_SET; | ||
1831 | |||
1830 | /* | 1832 | /* |
1831 | * Check for the existence of HEAD_OF_QUEUE, and if true return 1 | 1833 | * Check for the existence of HEAD_OF_QUEUE, and if true return 1 |
1832 | * to allow the passed struct se_cmd list of tasks to the front of the list. | 1834 | * to allow the passed struct se_cmd list of tasks to the front of the list. |
@@ -1949,6 +1951,9 @@ static void transport_complete_task_attr(struct se_cmd *cmd) | |||
1949 | if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) | 1951 | if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) |
1950 | return; | 1952 | return; |
1951 | 1953 | ||
1954 | if (!(cmd->se_cmd_flags & SCF_TASK_ATTR_SET)) | ||
1955 | goto restart; | ||
1956 | |||
1952 | if (cmd->sam_task_attr == TCM_SIMPLE_TAG) { | 1957 | if (cmd->sam_task_attr == TCM_SIMPLE_TAG) { |
1953 | atomic_dec_mb(&dev->simple_cmds); | 1958 | atomic_dec_mb(&dev->simple_cmds); |
1954 | dev->dev_cur_ordered_id++; | 1959 | dev->dev_cur_ordered_id++; |
@@ -1965,7 +1970,7 @@ static void transport_complete_task_attr(struct se_cmd *cmd) | |||
1965 | pr_debug("Incremented dev_cur_ordered_id: %u for ORDERED\n", | 1970 | pr_debug("Incremented dev_cur_ordered_id: %u for ORDERED\n", |
1966 | dev->dev_cur_ordered_id); | 1971 | dev->dev_cur_ordered_id); |
1967 | } | 1972 | } |
1968 | 1973 | restart: | |
1969 | target_restart_delayed_cmds(dev); | 1974 | target_restart_delayed_cmds(dev); |
1970 | } | 1975 | } |
1971 | 1976 | ||
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index b316b44d03f3..fb8e3b6febdf 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -142,6 +142,7 @@ enum se_cmd_flags_table { | |||
142 | SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC = 0x00200000, | 142 | SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC = 0x00200000, |
143 | SCF_ACK_KREF = 0x00400000, | 143 | SCF_ACK_KREF = 0x00400000, |
144 | SCF_USE_CPUID = 0x00800000, | 144 | SCF_USE_CPUID = 0x00800000, |
145 | SCF_TASK_ATTR_SET = 0x01000000, | ||
145 | }; | 146 | }; |
146 | 147 | ||
147 | /* | 148 | /* |