Set bufflen for not expected transfer len case to max to allow, e.g., to get immediat...
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 17 Mar 2010 17:40:17 +0000 (17:40 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 17 Mar 2010 17:40:17 +0000 (17:40 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1548 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/scst_targ.c

index 0df2245..0628a45 100644 (file)
@@ -632,6 +632,9 @@ static int scst_parse_cmd(struct scst_cmd *cmd)
                                cmd->bufflen);
                        PRINT_BUFF_FLAG(TRACE_MINOR, "Suspicious CDB",
                                cmd->cdb, cmd->cdb_len);
+                       /* Needed, e.g., to get immediate iSCSI data */
+                       cmd->bufflen = max(cmd->bufflen,
+                                          cmd->expected_transfer_len);
                }
 #endif
        }