Lines Matching refs:cmd

14  * qla4xxx_copy_sense - copy sense data	into cmd sense buffer
23 struct scsi_cmnd *cmd = srb->cmd;
26 memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
31 cmd->device->channel, cmd->device->id,
32 cmd->device->lun, __func__));
37 * not to exceed cmd's sense buffer size */
39 srb->req_sense_ptr = cmd->sense_buffer;
44 memcpy(cmd->sense_buffer, sts_entry->senseData, sense_len);
48 cmd->device->channel, cmd->device->id,
49 cmd->device->lun, __func__,
55 DEBUG5(qla4xxx_dump_buffer(cmd->sense_buffer, sense_len));
79 struct scsi_cmnd *cmd;
85 cmd = srb->cmd;
86 if (cmd == NULL) {
119 struct scsi_cmnd *cmd;
136 cmd = srb->cmd;
137 if (cmd == NULL) {
149 cmd->result = DID_NO_CONNECT << 16;
161 cmd->result = DID_ERROR << 16;
166 scsi_set_resid(cmd, residual);
167 if (!scsi_status && ((scsi_bufflen(cmd) - residual) <
168 cmd->underflow)) {
170 cmd->result = DID_ERROR << 16;
176 cmd->device->channel,
177 cmd->device->id,
178 cmd->device->lun, __func__,
179 scsi_bufflen(cmd), residual));
184 cmd->result = DID_OK << 16 | scsi_status;
196 cmd->result = DID_ERROR << 16;
201 ha->host_no, cmd->device->channel,
202 cmd->device->id, cmd->device->lun, __func__));
204 cmd->result = DID_RESET << 16;
209 ha->host_no, cmd->device->channel,
210 cmd->device->id, cmd->device->lun, __func__));
212 cmd->result = DID_RESET << 16;
217 ha->host_no, cmd->device->channel,
218 cmd->device->id, cmd->device->lun));
220 cmd->result = DID_TRANSPORT_DISRUPTED << 16;
237 cmd->device->channel, cmd->device->id,
238 cmd->device->lun, __func__));
240 cmd->result = DID_ERROR << 16;
244 scsi_set_resid(cmd, residual);
259 if (!scsi_status && (scsi_bufflen(cmd) - residual) <
260 cmd->underflow) {
264 cmd->device->channel,
265 cmd->device->id,
266 cmd->device->lun, __func__,
267 scsi_bufflen(cmd),
270 cmd->result = DID_ERROR << 16;
296 cmd->device->channel,
297 cmd->device->id,
298 cmd->device->lun, __func__,
300 scsi_bufflen(cmd)));
302 cmd->result = DID_ERROR << 16 | scsi_status;
306 cmd->result = DID_OK << 16 | scsi_status;
318 cmd->device->channel, cmd->device->id,
319 cmd->device->lun, sts_entry->completionStatus));
328 cmd->result = DID_TRANSPORT_DISRUPTED << 16;
335 cmd->result = DID_OK << 16 | sts_entry->scsiStatus;
338 " iResp=%02x\n", ha->host_no, cmd->device->id,
339 cmd->device->lun, __func__,
347 cmd->result = DID_ERROR << 16;
533 srb->cmd->result = DID_BUS_BUSY << 16;