Lines Matching refs:scpnt
73 static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) in zfcp_scsi_command_fail() argument
75 set_host_byte(scpnt, result); in zfcp_scsi_command_fail()
76 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_command_fail()
77 scpnt->scsi_done(scpnt); in zfcp_scsi_command_fail()
81 int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt) in zfcp_scsi_queuecommand() argument
83 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_queuecommand()
84 struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device)); in zfcp_scsi_queuecommand()
88 scpnt->result = 0; in zfcp_scsi_queuecommand()
89 scpnt->host_scribble = NULL; in zfcp_scsi_queuecommand()
93 scpnt->result = scsi_result; in zfcp_scsi_queuecommand()
94 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_queuecommand()
95 scpnt->scsi_done(scpnt); in zfcp_scsi_queuecommand()
105 zfcp_scsi_command_fail(scpnt, DID_ERROR); in zfcp_scsi_queuecommand()
116 zfcp_scsi_command_fail(scpnt, DID_IMM_RETRY); in zfcp_scsi_queuecommand()
120 ret = zfcp_fsf_fcp_cmnd(scpnt); in zfcp_scsi_queuecommand()
168 static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_abort_handler() argument
170 struct Scsi_Host *scsi_host = scpnt->device->host; in zfcp_scsi_eh_abort_handler()
175 unsigned long old_reqid = (unsigned long) scpnt->host_scribble; in zfcp_scsi_eh_abort_handler()
186 zfcp_dbf_scsi_abort("abrt_or", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
195 abrt_req = zfcp_fsf_abort_fcp_cmnd(scpnt); in zfcp_scsi_eh_abort_handler()
200 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_abort_handler()
202 zfcp_dbf_scsi_abort("abrt_bl", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
207 zfcp_dbf_scsi_abort("abrt_ru", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
212 zfcp_dbf_scsi_abort("abrt_ar", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
226 zfcp_dbf_scsi_abort(dbf_tag, scpnt, abrt_req); in zfcp_scsi_eh_abort_handler()
231 static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) in zfcp_task_mgmt_function() argument
233 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_task_mgmt_function()
240 fsf_req = zfcp_fsf_fcp_task_mgmt(scpnt, tm_flags); in zfcp_task_mgmt_function()
245 ret = fc_block_scsi_eh(scpnt); in zfcp_task_mgmt_function()
251 zfcp_dbf_scsi_devreset("nres", scpnt, tm_flags); in zfcp_task_mgmt_function()
261 zfcp_dbf_scsi_devreset("fail", scpnt, tm_flags); in zfcp_task_mgmt_function()
264 zfcp_dbf_scsi_devreset("okay", scpnt, tm_flags); in zfcp_task_mgmt_function()
270 static int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_device_reset_handler() argument
272 return zfcp_task_mgmt_function(scpnt, FCP_TMF_LUN_RESET); in zfcp_scsi_eh_device_reset_handler()
275 static int zfcp_scsi_eh_target_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_target_reset_handler() argument
277 return zfcp_task_mgmt_function(scpnt, FCP_TMF_TGT_RESET); in zfcp_scsi_eh_target_reset_handler()
280 static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_host_reset_handler() argument
282 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_eh_host_reset_handler()
288 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_host_reset_handler()