vm_srb->lun = 0; /* this is not really used at all */
vm_srb->cdb_length = blkvsc_req->cmd_len;
- storvsc_req->cdb = blkvsc_req->cmnd;
+
+ memcpy(vm_srb->cdb, blkvsc_req->cmnd, vm_srb->cdb_length);
storvsc_req->sense_buffer = blkvsc_req->sense_buffer;
storvsc_req->sense_buffer_size = SCSI_SENSE_BUFFERSIZE;
if (request->status != 0 || vstor_packet->vm_srb.srb_status != 1) {
DPRINT_WARN(STORVSC,
"cmd 0x%x scsi status 0x%x srb status 0x%x\n",
- request->cdb[0], vstor_packet->vm_srb.scsi_status,
+ vstor_packet->vm_srb.cdb[0],
+ vstor_packet->vm_srb.scsi_status,
vstor_packet->vm_srb.srb_status);
}
vstor_packet->vm_srb.sense_info_length = SENSE_BUFFER_SIZE;
- /* Copy over the scsi command descriptor block */
- memcpy(&vstor_packet->vm_srb.cdb, request->cdb,
- vstor_packet->vm_srb.cdb_length);
vstor_packet->vm_srb.data_transfer_length = request->data_buffer.len;
/* ASSERT(scmnd->cmd_len <= 16); */
vm_srb->cdb_length = scmnd->cmd_len;
- request->cdb = scmnd->cmnd;
+
+ memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length);
request->sense_buffer = scmnd->sense_buffer;
request->sense_buffer_size = SCSI_SENSE_BUFFERSIZE;