diff options
author | Andy Grover | 2012-01-19 22:39:23 +0100 |
---|---|---|
committer | Nicholas Bellinger | 2012-02-07 07:41:04 +0100 |
commit | 1edcdb497ef418122cd4f98e157660cf594b345a (patch) | |
tree | bf41780935b8996f85a0ae090897495961deb6d7 /drivers/target/target_core_transport.c | |
parent | target: accept REQUEST_SENSE with 18bytes (diff) | |
download | kernel-qcow2-linux-1edcdb497ef418122cd4f98e157660cf594b345a.tar.gz kernel-qcow2-linux-1edcdb497ef418122cd4f98e157660cf594b345a.tar.xz kernel-qcow2-linux-1edcdb497ef418122cd4f98e157660cf594b345a.zip |
target: Change target_submit_cmd() to return void
Retval not very useful, and may even be harmful. Once submitted, fabrics
should expect a sense error if anything goes wrong. All fabrics checking
of this retval are useless or broken:
fc checks it just to emit more debug output.
ib_srpt trickles retval up, then it is ignored.
qla2xxx trickles it up, which then causes a bug because the abort goto
in qla_target.c thinks cmd hasn't been sent to target.
Just returning nothing is best.
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index cf996d81cfcb..aace7ee141f3 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(transport_handle_cdb_direct); * This may only be called from process context, and also currently * assumes internal allocation of fabric payload buffer by target-core. **/ -int target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, +void target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, unsigned char *cdb, unsigned char *sense, u32 unpacked_lun, u32 data_length, int task_attr, int data_dir, int flags) { @@ -1706,12 +1706,11 @@ int target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, * when fabric has filled the incoming buffer. */ transport_handle_cdb_direct(se_cmd); - return 0; + return; out_check_cond: transport_send_check_condition_and_sense(se_cmd, se_cmd->scsi_sense_reason, 0); - return 0; } EXPORT_SYMBOL(target_submit_cmd); |