Lines Matching refs:cmd

22 	struct scsi_cmnd *cmd = srb->cmd;  in qla4xxx_copy_sense()  local
25 memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); in qla4xxx_copy_sense()
30 cmd->device->channel, cmd->device->id, in qla4xxx_copy_sense()
31 cmd->device->lun, __func__)); in qla4xxx_copy_sense()
38 srb->req_sense_ptr = cmd->sense_buffer; in qla4xxx_copy_sense()
43 memcpy(cmd->sense_buffer, sts_entry->senseData, sense_len); in qla4xxx_copy_sense()
47 cmd->device->channel, cmd->device->id, in qla4xxx_copy_sense()
48 cmd->device->lun, __func__, in qla4xxx_copy_sense()
54 DEBUG5(qla4xxx_dump_buffer(cmd->sense_buffer, sense_len)); in qla4xxx_copy_sense()
78 struct scsi_cmnd *cmd; in qla4xxx_status_cont_entry() local
84 cmd = srb->cmd; in qla4xxx_status_cont_entry()
85 if (cmd == NULL) { in qla4xxx_status_cont_entry()
118 struct scsi_cmnd *cmd; in qla4xxx_status_entry() local
135 cmd = srb->cmd; in qla4xxx_status_entry()
136 if (cmd == NULL) { in qla4xxx_status_entry()
148 cmd->result = DID_NO_CONNECT << 16; in qla4xxx_status_entry()
160 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
165 scsi_set_resid(cmd, residual); in qla4xxx_status_entry()
166 if (!scsi_status && ((scsi_bufflen(cmd) - residual) < in qla4xxx_status_entry()
167 cmd->underflow)) { in qla4xxx_status_entry()
169 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
175 cmd->device->channel, in qla4xxx_status_entry()
176 cmd->device->id, in qla4xxx_status_entry()
177 cmd->device->lun, __func__, in qla4xxx_status_entry()
178 scsi_bufflen(cmd), residual)); in qla4xxx_status_entry()
183 cmd->result = DID_OK << 16 | scsi_status; in qla4xxx_status_entry()
195 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
200 ha->host_no, cmd->device->channel, in qla4xxx_status_entry()
201 cmd->device->id, cmd->device->lun, __func__)); in qla4xxx_status_entry()
203 cmd->result = DID_RESET << 16; in qla4xxx_status_entry()
208 ha->host_no, cmd->device->channel, in qla4xxx_status_entry()
209 cmd->device->id, cmd->device->lun, __func__)); in qla4xxx_status_entry()
211 cmd->result = DID_RESET << 16; in qla4xxx_status_entry()
216 ha->host_no, cmd->device->channel, in qla4xxx_status_entry()
217 cmd->device->id, cmd->device->lun)); in qla4xxx_status_entry()
219 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in qla4xxx_status_entry()
236 cmd->device->channel, cmd->device->id, in qla4xxx_status_entry()
237 cmd->device->lun, __func__)); in qla4xxx_status_entry()
239 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
243 scsi_set_resid(cmd, residual); in qla4xxx_status_entry()
258 if (!scsi_status && (scsi_bufflen(cmd) - residual) < in qla4xxx_status_entry()
259 cmd->underflow) { in qla4xxx_status_entry()
263 cmd->device->channel, in qla4xxx_status_entry()
264 cmd->device->id, in qla4xxx_status_entry()
265 cmd->device->lun, __func__, in qla4xxx_status_entry()
266 scsi_bufflen(cmd), in qla4xxx_status_entry()
269 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
295 cmd->device->channel, in qla4xxx_status_entry()
296 cmd->device->id, in qla4xxx_status_entry()
297 cmd->device->lun, __func__, in qla4xxx_status_entry()
299 scsi_bufflen(cmd))); in qla4xxx_status_entry()
301 cmd->result = DID_ERROR << 16 | scsi_status; in qla4xxx_status_entry()
305 cmd->result = DID_OK << 16 | scsi_status; in qla4xxx_status_entry()
317 cmd->device->channel, cmd->device->id, in qla4xxx_status_entry()
318 cmd->device->lun, sts_entry->completionStatus)); in qla4xxx_status_entry()
327 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in qla4xxx_status_entry()
334 cmd->result = DID_OK << 16 | sts_entry->scsiStatus; in qla4xxx_status_entry()
337 " iResp=%02x\n", ha->host_no, cmd->device->id, in qla4xxx_status_entry()
338 cmd->device->lun, __func__, in qla4xxx_status_entry()
346 cmd->result = DID_ERROR << 16; in qla4xxx_status_entry()
530 srb->cmd->result = DID_BUS_BUSY << 16; in qla4xxx_process_response_queue()