Lines Matching refs:scpnt
75 static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) in zfcp_scsi_command_fail() argument
77 set_host_byte(scpnt, result); in zfcp_scsi_command_fail()
78 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_command_fail()
79 scpnt->scsi_done(scpnt); in zfcp_scsi_command_fail()
83 int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt) in zfcp_scsi_queuecommand() argument
85 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_queuecommand()
86 struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device)); in zfcp_scsi_queuecommand()
90 scpnt->result = 0; in zfcp_scsi_queuecommand()
91 scpnt->host_scribble = NULL; in zfcp_scsi_queuecommand()
95 scpnt->result = scsi_result; in zfcp_scsi_queuecommand()
96 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_queuecommand()
97 scpnt->scsi_done(scpnt); in zfcp_scsi_queuecommand()
107 zfcp_scsi_command_fail(scpnt, DID_ERROR); in zfcp_scsi_queuecommand()
118 zfcp_scsi_command_fail(scpnt, DID_IMM_RETRY); in zfcp_scsi_queuecommand()
122 ret = zfcp_fsf_fcp_cmnd(scpnt); in zfcp_scsi_queuecommand()
175 static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_abort_handler() argument
177 struct Scsi_Host *scsi_host = scpnt->device->host; in zfcp_scsi_eh_abort_handler()
182 unsigned long old_reqid = (unsigned long) scpnt->host_scribble; in zfcp_scsi_eh_abort_handler()
193 zfcp_dbf_scsi_abort("abrt_or", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
202 abrt_req = zfcp_fsf_abort_fcp_cmnd(scpnt); in zfcp_scsi_eh_abort_handler()
207 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_abort_handler()
209 zfcp_dbf_scsi_abort("abrt_bl", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
214 zfcp_dbf_scsi_abort("abrt_ru", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
219 zfcp_dbf_scsi_abort("abrt_ar", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
233 zfcp_dbf_scsi_abort(dbf_tag, scpnt, abrt_req); in zfcp_scsi_eh_abort_handler()
238 static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) in zfcp_task_mgmt_function() argument
240 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_task_mgmt_function()
247 fsf_req = zfcp_fsf_fcp_task_mgmt(scpnt, tm_flags); in zfcp_task_mgmt_function()
252 ret = fc_block_scsi_eh(scpnt); in zfcp_task_mgmt_function()
254 zfcp_dbf_scsi_devreset("fiof", scpnt, tm_flags); in zfcp_task_mgmt_function()
260 zfcp_dbf_scsi_devreset("nres", scpnt, tm_flags); in zfcp_task_mgmt_function()
265 zfcp_dbf_scsi_devreset("reqf", scpnt, tm_flags); in zfcp_task_mgmt_function()
272 zfcp_dbf_scsi_devreset("fail", scpnt, tm_flags); in zfcp_task_mgmt_function()
275 zfcp_dbf_scsi_devreset("okay", scpnt, tm_flags); in zfcp_task_mgmt_function()
281 static int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_device_reset_handler() argument
283 return zfcp_task_mgmt_function(scpnt, FCP_TMF_LUN_RESET); in zfcp_scsi_eh_device_reset_handler()
286 static int zfcp_scsi_eh_target_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_target_reset_handler() argument
288 return zfcp_task_mgmt_function(scpnt, FCP_TMF_TGT_RESET); in zfcp_scsi_eh_target_reset_handler()
291 static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_host_reset_handler() argument
293 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_eh_host_reset_handler()
299 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_host_reset_handler()