Lines Matching defs: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);
3500 ql4_printk(KERN_INFO, ha, "%s: scsi cmd xmit not implemented\n",
4053 struct scsi_cmnd *cmd)
4064 srb->cmd = cmd;
4066 qla4xxx_cmd_priv(cmd)->srb = srb;
4073 struct scsi_cmnd *cmd = srb->cmd;
4076 scsi_dma_unmap(cmd);
4079 qla4xxx_cmd_priv(cmd)->srb = NULL;
4085 struct scsi_cmnd *cmd = srb->cmd;
4092 scsi_done(cmd);
4098 * @cmd: Pointer to Linux's SCSI command structure
4108 static int qla4xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
4111 struct ddb_entry *ddb_entry = cmd->device->hostdata;
4118 cmd->result = DID_NO_CONNECT << 16;
4120 cmd->result = DID_REQUEUE << 16;
4125 cmd->result = DID_IMM_RETRY << 16;
4131 cmd->result = rval;
4148 srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd);
4166 scsi_done(cmd);
4626 struct scsi_cmnd *cmd;
4645 cmd = scsi_host_find_tag(ha->host, index);
4652 if (cmd != NULL && qla4xxx_cmd_priv(cmd)->srb)
4814 srb->cmd->result = res;
9086 struct scsi_cmnd *cmd = NULL;
9088 cmd = scsi_host_find_tag(ha->host, index);
9089 if (!cmd)
9092 srb = qla4xxx_cmd_priv(cmd)->srb;
9099 if (srb->cmd)
9100 srb->cmd->host_scribble =
9109 * @cmd: Scsi Command to wait on.
9115 struct scsi_cmnd *cmd)
9134 rp = qla4xxx_cmd_priv(cmd)->srb;
9181 struct scsi_cmnd *cmd;
9188 cmd = scsi_host_find_tag(ha->host, cnt);
9189 if (cmd && stgt == scsi_target(cmd->device) &&
9190 (!sdev || sdev == cmd->device)) {
9191 if (!qla4xxx_eh_wait_on_command(ha, cmd)) {
9202 * @cmd: Pointer to Linux's SCSI command structure
9207 static int qla4xxx_eh_abort(struct scsi_cmnd *cmd)
9209 struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
9210 unsigned int id = cmd->device->id;
9211 uint64_t lun = cmd->device->lun;
9218 ql4_printk(KERN_INFO, ha, "scsi%ld:%d:%llu: Abort command issued cmd=%p, cdb=0x%x\n",
9219 ha->host_no, id, lun, cmd, cmd->cmnd[0]);
9228 srb = qla4xxx_cmd_priv(cmd)->srb;
9252 if (!qla4xxx_eh_wait_on_command(ha, cmd)) {
9268 * @cmd: Pointer to Linux's SCSI command structure
9273 static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
9275 struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
9276 struct ddb_entry *ddb_entry = cmd->device->hostdata;
9283 ret = iscsi_block_scsi_eh(cmd);
9290 cmd->device->channel, cmd->device->id, cmd->device->lun);
9293 "scsi%ld: DEVICE_RESET cmd=%p jiffies = 0x%lx, to=%x,"
9295 cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ,
9296 ha->dpc_flags, cmd->result, cmd->allowed));
9305 stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun);
9311 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device),
9312 cmd->device)) {
9320 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun,
9326 ha->host_no, cmd->device->channel, cmd->device->id,
9327 cmd->device->lun);
9338 * @cmd: Pointer to Linux's SCSI command structure
9342 static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd)
9344 struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
9345 struct ddb_entry *ddb_entry = cmd->device->hostdata;
9352 ret = iscsi_block_scsi_eh(cmd);
9356 starget_printk(KERN_INFO, scsi_target(cmd->device),
9360 "scsi%ld: TARGET_DEVICE_RESET cmd=%p jiffies = 0x%lx, "
9362 ha->host_no, cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ,
9363 ha->dpc_flags, cmd->result, cmd->allowed));
9373 starget_printk(KERN_INFO, scsi_target(cmd->device),
9378 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device),
9380 starget_printk(KERN_INFO, scsi_target(cmd->device),
9387 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun,
9389 starget_printk(KERN_INFO, scsi_target(cmd->device),
9395 starget_printk(KERN_INFO, scsi_target(cmd->device),
9416 * @cmd: Pointer to Linux's SCSI command structure
9421 static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
9427 ha = to_qla_host(cmd->device->host);
9449 if (qla4xxx_is_eh_active(cmd->device->host))
9457 cmd->device->channel, cmd->device->id, cmd->device->lun);
9461 "DEAD.\n", ha->host_no, cmd->device->channel,