READ10: only set R flag in iscsi if we are reading >0 blocks.

If we are reading 0 blocks, the R flag should be clear
This commit is contained in:
Ronnie Sahlberg
2011-04-04 18:33:29 +10:00
parent 5225b5fa66
commit e7300bfb8b

View File

@@ -525,7 +525,11 @@ scsi_cdb_read10(uint32_t lba, uint32_t xferlen, int blocksize)
*(uint16_t *)&task->cdb[7] = htons(xferlen/blocksize);
task->cdb_size = 10;
task->xfer_dir = SCSI_XFER_READ;
if (xferlen != 0) {
task->xfer_dir = SCSI_XFER_READ;
} else {
task->xfer_dir = SCSI_XFER_NONE;
}
task->expxferlen = xferlen;
task->params.read10.lba = lba;