Lines Matching refs:scmnd

1033 				struct scsi_cmnd *scmnd,  in storvsc_handle_error()  argument
1049 switch (scmnd->cmnd[0]) { in storvsc_handle_error()
1052 set_host_byte(scmnd, DID_PASSTHROUGH); in storvsc_handle_error()
1062 set_host_byte(scmnd, DID_TARGET_FAILURE); in storvsc_handle_error()
1076 set_host_byte(scmnd, DID_REQUEUE); in storvsc_handle_error()
1089 set_host_byte(scmnd, DID_TARGET_FAILURE); in storvsc_handle_error()
1102 struct scsi_cmnd *scmnd = cmd_request->cmd; in storvsc_command_completion() local
1103 struct hv_host_device *host_dev = shost_priv(scmnd->device->host); in storvsc_command_completion()
1118 copy_from_bounce_buffer(scsi_sglist(scmnd), in storvsc_command_completion()
1120 scsi_sg_count(scmnd), in storvsc_command_completion()
1126 scmnd->result = vm_srb->scsi_status; in storvsc_command_completion()
1128 if (scmnd->result) { in storvsc_command_completion()
1129 if (scsi_normalize_sense(scmnd->sense_buffer, in storvsc_command_completion()
1131 scsi_print_sense_hdr(scmnd->device, "storvsc", in storvsc_command_completion()
1136 storvsc_handle_error(vm_srb, scmnd, host, sense_hdr.asc, in storvsc_command_completion()
1139 scsi_set_resid(scmnd, in storvsc_command_completion()
1143 scmnd->scsi_done(scmnd); in storvsc_command_completion()
1468 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) in storvsc_host_reset_handler() argument
1470 struct hv_host_device *host_dev = shost_priv(scmnd->device->host); in storvsc_host_reset_handler()
1524 static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd) in storvsc_eh_timed_out() argument
1529 static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) in storvsc_scsi_cmd_ok() argument
1532 u8 scsi_op = scmnd->cmnd[0]; in storvsc_scsi_cmd_ok()
1542 scmnd->result = ILLEGAL_REQUEST << 16; in storvsc_scsi_cmd_ok()
1551 static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) in storvsc_queuecommand() argument
1556 struct storvsc_cmd_request *cmd_request = scsi_cmd_priv(scmnd); in storvsc_queuecommand()
1575 if (!storvsc_scsi_cmd_ok(scmnd)) { in storvsc_queuecommand()
1576 scmnd->scsi_done(scmnd); in storvsc_queuecommand()
1582 cmd_request->cmd = scmnd; in storvsc_queuecommand()
1592 switch (scmnd->sc_data_direction) { in storvsc_queuecommand()
1609 vm_srb->path_id = scmnd->device->channel; in storvsc_queuecommand()
1610 vm_srb->target_id = scmnd->device->id; in storvsc_queuecommand()
1611 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
1613 vm_srb->cdb_length = scmnd->cmd_len; in storvsc_queuecommand()
1615 memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length); in storvsc_queuecommand()
1617 sgl = (struct scatterlist *)scsi_sglist(scmnd); in storvsc_queuecommand()
1618 sg_count = scsi_sg_count(scmnd); in storvsc_queuecommand()
1620 length = scsi_bufflen(scmnd); in storvsc_queuecommand()
1626 if (do_bounce_buffer(sgl, scsi_sg_count(scmnd)) != -1) { in storvsc_queuecommand()
1671 } else if (scsi_sglist(scmnd)) { in storvsc_queuecommand()
1674 virt_to_phys(scsi_sglist(scmnd)) & (PAGE_SIZE-1); in storvsc_queuecommand()
1676 virt_to_phys(scsi_sglist(scmnd)) >> PAGE_SHIFT; in storvsc_queuecommand()