diff --git a/scst/src/dev_handlers/scst_tape.c b/scst/src/dev_handlers/scst_tape.c index e30812699..b012e58e6 100644 --- a/scst/src/dev_handlers/scst_tape.c +++ b/scst/src/dev_handlers/scst_tape.c @@ -313,7 +313,7 @@ static int tape_done(struct scst_cmd *cmd) cmd->cdb[1], TransferLength, Residue); if (TransferLength > Residue) { int resp_data_len = TransferLength - Residue; - if (cmd->cdb[1] & SCST_TRANSFER_LEN_TYPE_FIXED) { + if (cmd->cdb[1] & 1) { /* * No need for locks here, since * *_detach() can not be called, when diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b230b85ea..fcc8c48ac 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -7130,7 +7130,7 @@ int scst_tape_generic_parse(struct scst_cmd *cmd) cmd->data_len = cmd->bufflen; } - if (cmd->op_flags & SCST_TRANSFER_LEN_TYPE_FIXED & cmd->cdb[1]) { + if (cmd->op_flags & SCST_TRANSFER_LEN_TYPE_FIXED && cmd->cdb[1] & 1) { int block_size = cmd->dev->block_size; cmd->bufflen = cmd->bufflen * block_size; cmd->data_len = cmd->data_len * block_size;