Lines Matching refs:cmd
158 static int qla4xxx_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmd);
159 static int qla4xxx_eh_abort(struct scsi_cmnd *cmd);
160 static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd);
161 static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd);
162 static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd);
4053 struct scsi_cmnd *cmd) in qla4xxx_get_new_srb() argument
4064 srb->cmd = cmd; in qla4xxx_get_new_srb()
4066 qla4xxx_cmd_priv(cmd)->srb = srb; in qla4xxx_get_new_srb()
4073 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_free_dma() local
4076 scsi_dma_unmap(cmd); in qla4xxx_srb_free_dma()
4079 qla4xxx_cmd_priv(cmd)->srb = NULL; in qla4xxx_srb_free_dma()
4085 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_compl() local
4092 scsi_done(cmd); in qla4xxx_srb_compl()
4108 static int qla4xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) in qla4xxx_queuecommand() argument
4111 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_queuecommand()
4118 cmd->result = DID_NO_CONNECT << 16; in qla4xxx_queuecommand()
4120 cmd->result = DID_REQUEUE << 16; in qla4xxx_queuecommand()
4125 cmd->result = DID_IMM_RETRY << 16; in qla4xxx_queuecommand()
4131 cmd->result = rval; in qla4xxx_queuecommand()
4148 srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd); in qla4xxx_queuecommand()
4166 scsi_done(cmd); in qla4xxx_queuecommand()
4626 struct scsi_cmnd *cmd; in qla4xxx_cmd_wait() local
4645 cmd = scsi_host_find_tag(ha->host, index); in qla4xxx_cmd_wait()
4652 if (cmd != NULL && qla4xxx_cmd_priv(cmd)->srb) in qla4xxx_cmd_wait()
4814 srb->cmd->result = res; in qla4xxx_abort_active_cmds()
9086 struct scsi_cmnd *cmd = NULL; in qla4xxx_del_from_active_array() local
9088 cmd = scsi_host_find_tag(ha->host, index); in qla4xxx_del_from_active_array()
9089 if (!cmd) in qla4xxx_del_from_active_array()
9092 srb = qla4xxx_cmd_priv(cmd)->srb; in qla4xxx_del_from_active_array()
9099 if (srb->cmd) in qla4xxx_del_from_active_array()
9100 srb->cmd->host_scribble = in qla4xxx_del_from_active_array()
9115 struct scsi_cmnd *cmd) in qla4xxx_eh_wait_on_command() argument
9134 rp = qla4xxx_cmd_priv(cmd)->srb; in qla4xxx_eh_wait_on_command()
9181 struct scsi_cmnd *cmd; in qla4xxx_eh_wait_for_commands() local
9188 cmd = scsi_host_find_tag(ha->host, cnt); in qla4xxx_eh_wait_for_commands()
9189 if (cmd && stgt == scsi_target(cmd->device) && in qla4xxx_eh_wait_for_commands()
9190 (!sdev || sdev == cmd->device)) { in qla4xxx_eh_wait_for_commands()
9191 if (!qla4xxx_eh_wait_on_command(ha, cmd)) { in qla4xxx_eh_wait_for_commands()
9207 static int qla4xxx_eh_abort(struct scsi_cmnd *cmd) in qla4xxx_eh_abort() argument
9209 struct scsi_qla_host *ha = to_qla_host(cmd->device->host); in qla4xxx_eh_abort()
9210 unsigned int id = cmd->device->id; in qla4xxx_eh_abort()
9211 uint64_t lun = cmd->device->lun; in qla4xxx_eh_abort()
9219 ha->host_no, id, lun, cmd, cmd->cmnd[0]); in qla4xxx_eh_abort()
9228 srb = qla4xxx_cmd_priv(cmd)->srb; in qla4xxx_eh_abort()
9252 if (!qla4xxx_eh_wait_on_command(ha, cmd)) { in qla4xxx_eh_abort()
9273 static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd) in qla4xxx_eh_device_reset() argument
9275 struct scsi_qla_host *ha = to_qla_host(cmd->device->host); in qla4xxx_eh_device_reset()
9276 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_eh_device_reset()
9283 ret = iscsi_block_scsi_eh(cmd); in qla4xxx_eh_device_reset()
9290 cmd->device->channel, cmd->device->id, cmd->device->lun); in qla4xxx_eh_device_reset()
9295 cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ, in qla4xxx_eh_device_reset()
9296 ha->dpc_flags, cmd->result, cmd->allowed)); in qla4xxx_eh_device_reset()
9305 stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun); in qla4xxx_eh_device_reset()
9311 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), in qla4xxx_eh_device_reset()
9312 cmd->device)) { in qla4xxx_eh_device_reset()
9320 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, in qla4xxx_eh_device_reset()
9326 ha->host_no, cmd->device->channel, cmd->device->id, in qla4xxx_eh_device_reset()
9327 cmd->device->lun); in qla4xxx_eh_device_reset()
9342 static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd) in qla4xxx_eh_target_reset() argument
9344 struct scsi_qla_host *ha = to_qla_host(cmd->device->host); in qla4xxx_eh_target_reset()
9345 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_eh_target_reset()
9352 ret = iscsi_block_scsi_eh(cmd); in qla4xxx_eh_target_reset()
9356 starget_printk(KERN_INFO, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9362 ha->host_no, cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ, in qla4xxx_eh_target_reset()
9363 ha->dpc_flags, cmd->result, cmd->allowed)); in qla4xxx_eh_target_reset()
9373 starget_printk(KERN_INFO, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9378 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9380 starget_printk(KERN_INFO, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9387 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, in qla4xxx_eh_target_reset()
9389 starget_printk(KERN_INFO, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9395 starget_printk(KERN_INFO, scsi_target(cmd->device), in qla4xxx_eh_target_reset()
9421 static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd) in qla4xxx_eh_host_reset() argument
9427 ha = to_qla_host(cmd->device->host); in qla4xxx_eh_host_reset()
9449 if (qla4xxx_is_eh_active(cmd->device->host)) in qla4xxx_eh_host_reset()
9457 cmd->device->channel, cmd->device->id, cmd->device->lun); in qla4xxx_eh_host_reset()
9461 "DEAD.\n", ha->host_no, cmd->device->channel, in qla4xxx_eh_host_reset()