Add handling of non-NONE data transfer direction commands with 0 buffer length in scst_user module.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@694 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-03-09 19:24:32 +00:00
parent 04cb6b446a
commit 271b6887d9
+8
View File
@@ -791,6 +791,14 @@ static int dev_user_parse(struct scst_cmd *cmd)
}
alloc:
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->data_direction != SCST_DATA_NONE)
res = dev_user_alloc_space(ucmd);