Lines Matching defs:scpnt

75 static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result)
77 set_host_byte(scpnt, result);
78 zfcp_dbf_scsi_fail_send(scpnt);
79 scpnt->scsi_done(scpnt);
83 int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt)
85 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device);
86 struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device));
90 scpnt->result = 0;
91 scpnt->host_scribble = NULL;
95 scpnt->result = scsi_result;
96 zfcp_dbf_scsi_fail_send(scpnt);
97 scpnt->scsi_done(scpnt);
107 zfcp_scsi_command_fail(scpnt, DID_ERROR);
118 zfcp_scsi_command_fail(scpnt, DID_IMM_RETRY);
122 ret = zfcp_fsf_fcp_cmnd(scpnt);
170 static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
172 struct Scsi_Host *scsi_host = scpnt->device->host;
177 unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
188 zfcp_dbf_scsi_abort("abrt_or", scpnt, NULL);
197 abrt_req = zfcp_fsf_abort_fcp_cmnd(scpnt);
202 ret = fc_block_scsi_eh(scpnt);
204 zfcp_dbf_scsi_abort("abrt_bl", scpnt, NULL);
209 zfcp_dbf_scsi_abort("abrt_ru", scpnt, NULL);
214 zfcp_dbf_scsi_abort("abrt_ar", scpnt, NULL);
228 zfcp_dbf_scsi_abort(dbf_tag, scpnt, abrt_req);
233 static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
235 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device);
242 fsf_req = zfcp_fsf_fcp_task_mgmt(scpnt, tm_flags);
247 ret = fc_block_scsi_eh(scpnt);
253 zfcp_dbf_scsi_devreset("nres", scpnt, tm_flags);
263 zfcp_dbf_scsi_devreset("fail", scpnt, tm_flags);
266 zfcp_dbf_scsi_devreset("okay", scpnt, tm_flags);
272 static int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
274 return zfcp_task_mgmt_function(scpnt, FCP_TMF_LUN_RESET);
277 static int zfcp_scsi_eh_target_reset_handler(struct scsi_cmnd *scpnt)
279 return zfcp_task_mgmt_function(scpnt, FCP_TMF_TGT_RESET);
282 static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
284 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device);
290 ret = fc_block_scsi_eh(scpnt);