On Thu, 2016-06-30 at 13:50 -0500, Bryant G. Ly wrote: > If a Simple command is sent with a failure, > target_setup_cmd_from_cdb returns with TCM_UNSUPPORTED_SCSI_OPCODE > or TCM_INVALID_CDB_FIELD. So in the cases where target_setup_cmd_from_cdb > returns an error, we never get far enough to call target_execute_cmd to > increment simple_cmds. Since simple_cmds isn't incremented, the > result of the failure from target_setup_cmd_from_cdb causes > transport_generic_request_failure to decrement > simple_cmds, due to call to transport_complete_task_attr. > With this dev->simple_cmds or dev->dev_ordered_sync is now -1, not 0. > So when a subsequent command with an Ordered Task is sent, it causes > a hang, since dev->simple_cmds is at -1. > > Signed-off-by: Michael Cyr <mikecyr@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx> > --- > drivers/target/target_core_transport.c | 6 ++++++ > include/target/target_core_base.h | 3 ++- > 2 files changed, 8 insertions(+), 1 deletion(-) > Applied to target-pending/for-next, preceeding the ibmvscsis commit. Thanks again Bryant + Michael for reviewing + testing this patch. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html