INQUIRY: When alloc_len is set to 0 we should set XFER direction to NONOE, not READ

This commit is contained in:
Ronnie Sahlberg
2012-09-19 18:23:54 -07:00
parent 641027283b
commit 8f98cf3e12

View File

@@ -420,7 +420,11 @@ scsi_cdb_inquiry(int evpd, int page_code, int alloc_len)
*(uint16_t *)&task->cdb[3] = htons(alloc_len);
task->cdb_size = 6;
task->xfer_dir = SCSI_XFER_READ;
if (alloc_len > 0) {
task->xfer_dir = SCSI_XFER_READ;
} else {
task->xfer_dir = SCSI_XFER_NONE;
}
task->expxferlen = alloc_len;
task->params.inquiry.evpd = evpd;