git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@683
d57e44dd-8a1f-0410-8b47-
8ef2f437770f
cmd->op_flags = ptr->flags;
res = (*ptr->get_trans_len)(cmd, ptr->off);
- if (cmd->bufflen == 0) {
- /*
- * According to SPC bufflen 0 for data transfer commands isn't
- * an error, so we need to fix the transfer direction.
- */
- cmd->data_direction = SCST_DATA_NONE;
- }
-
out:
TRACE_EXIT();
return res;
if (cmd->data_len == -1)
cmd->data_len = cmd->bufflen;
+ if (cmd->bufflen == 0) {
+ /*
+ * According to SPC bufflen 0 for data transfer commands isn't
+ * an error, so we need to fix the transfer direction.
+ */
+ cmd->data_direction = SCST_DATA_NONE;
+ }
+
if (cmd->dh_data_buf_alloced &&
unlikely((orig_bufflen > cmd->bufflen))) {
PRINT_ERROR("Dev handler supplied data buffer (size %d), "