VERIFY commands that comes with BYTCHK unset (i.e. no data to write)

shouldn't fail

Signed-off-by: Gal Rosen <galr@storwize.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-09-30 18:15:06 +00:00
parent c1f04d3ad9
commit 8570113f7a
+5 -1
View File
@@ -528,7 +528,11 @@ static int scst_parse_cmd(struct scst_cmd *cmd)
if (((cmd->expected_data_direction != SCST_DATA_NONE) ||
(cmd->bufflen != 0)) &&
/* Crazy VMware people sometimes do TUR with READ direction */
!(cmd->cdb[0] == TEST_UNIT_READY)) {
(!(cmd->cdb[0] == TEST_UNIT_READY) &&
/* VERIFY commands with BYTCHK unset shouldn't fail here */
!(((cmd->cdb[0] == VERIFY) || (cmd->cdb[0] == VERIFY_6) ||
(cmd->cdb[0] == VERIFY_12) || (cmd->cdb[0] == VERIFY_16)) &&
((cmd->cdb[1] & BYTCHK) == 0)))) {
PRINT_ERROR("Expected data direction %d for opcode "
"0x%02x (handler %s, target %s) doesn't match "
"decoded value %d", cmd->expected_data_direction,