Commit 373dd8a9 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Get rid of cdb from struct hv_storvsc_request

In preparation for consolidating all I/O request state, get rid of the
cdb field from struct hv_storvsc_request and instead
directly copy the command into struct vmscsi_request.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 473f9409
......@@ -949,7 +949,8 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
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;
......
......@@ -301,7 +301,8 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
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);
}
......@@ -551,9 +552,6 @@ int stor_vsc_on_io_request(struct hv_device *device,
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;
......
......@@ -66,7 +66,6 @@ struct storvsc_request_extension {
};
struct hv_storvsc_request {
u8 *cdb;
u32 status;
u32 bytes_xfer;
......
......@@ -781,7 +781,8 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
/* 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment