mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user