Lines Matching refs:cmd

89 void scsi_log_send(struct scsi_cmnd *cmd)  in scsi_log_send()  argument
108 scmd_printk(KERN_INFO, cmd, in scsi_log_send()
109 "Send: scmd 0x%p\n", cmd); in scsi_log_send()
110 scsi_print_command(cmd); in scsi_log_send()
115 void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) in scsi_log_completion() argument
134 if (((level > 0) && (cmd->result || disposition != SUCCESS)) || in scsi_log_completion()
136 scsi_print_result(cmd, "Done", disposition); in scsi_log_completion()
137 scsi_print_command(cmd); in scsi_log_completion()
138 if (scsi_status_is_check_condition(cmd->result)) in scsi_log_completion()
139 scsi_print_sense(cmd); in scsi_log_completion()
141 scmd_printk(KERN_INFO, cmd, in scsi_log_completion()
143 scsi_host_busy(cmd->device->host), in scsi_log_completion()
144 cmd->device->host->host_failed); in scsi_log_completion()
158 void scsi_finish_command(struct scsi_cmnd *cmd) in scsi_finish_command() argument
160 struct scsi_device *sdev = cmd->device; in scsi_finish_command()
166 scsi_device_unbusy(sdev, cmd); in scsi_finish_command()
181 "(result %x)\n", cmd->result)); in scsi_finish_command()
183 good_bytes = scsi_bufflen(cmd); in scsi_finish_command()
184 if (!blk_rq_is_passthrough(scsi_cmd_to_rq(cmd))) { in scsi_finish_command()
186 drv = scsi_cmd_to_driver(cmd); in scsi_finish_command()
188 good_bytes = drv->done(cmd); in scsi_finish_command()
196 good_bytes -= scsi_get_resid(cmd); in scsi_finish_command()
198 scsi_io_completion(cmd, good_bytes); in scsi_finish_command()
296 unsigned char cmd[16]; in scsi_vpd_inquiry() local
301 cmd[0] = INQUIRY; in scsi_vpd_inquiry()
302 cmd[1] = 1; /* EVPD */ in scsi_vpd_inquiry()
303 cmd[2] = page; in scsi_vpd_inquiry()
304 cmd[3] = len >> 8; in scsi_vpd_inquiry()
305 cmd[4] = len & 0xff; in scsi_vpd_inquiry()
306 cmd[5] = 0; /* Control byte */ in scsi_vpd_inquiry()
312 result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buffer, len, in scsi_vpd_inquiry()
549 unsigned char cmd[16]; in scsi_report_opcode() local
568 memset(cmd, 0, 16); in scsi_report_opcode()
569 cmd[0] = MAINTENANCE_IN; in scsi_report_opcode()
570 cmd[1] = MI_REPORT_SUPPORTED_OPERATION_CODES; in scsi_report_opcode()
572 cmd[2] = 1; /* One command format */ in scsi_report_opcode()
573 cmd[3] = opcode; in scsi_report_opcode()
575 cmd[2] = 3; /* One command format with service action */ in scsi_report_opcode()
576 cmd[3] = opcode; in scsi_report_opcode()
577 put_unaligned_be16(sa, &cmd[4]); in scsi_report_opcode()
579 put_unaligned_be32(request_len, &cmd[6]); in scsi_report_opcode()
582 result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buffer, in scsi_report_opcode()