Lines Matching refs:scpnt

54 static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result)  in zfcp_scsi_command_fail()  argument
56 set_host_byte(scpnt, result); in zfcp_scsi_command_fail()
57 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_command_fail()
58 scpnt->scsi_done(scpnt); in zfcp_scsi_command_fail()
62 int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt) in zfcp_scsi_queuecommand() argument
64 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_queuecommand()
65 struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device)); in zfcp_scsi_queuecommand()
69 scpnt->result = 0; in zfcp_scsi_queuecommand()
70 scpnt->host_scribble = NULL; in zfcp_scsi_queuecommand()
74 scpnt->result = scsi_result; in zfcp_scsi_queuecommand()
75 zfcp_dbf_scsi_fail_send(scpnt); in zfcp_scsi_queuecommand()
76 scpnt->scsi_done(scpnt); in zfcp_scsi_queuecommand()
86 zfcp_scsi_command_fail(scpnt, DID_ERROR); in zfcp_scsi_queuecommand()
97 zfcp_scsi_command_fail(scpnt, DID_IMM_RETRY); in zfcp_scsi_queuecommand()
101 ret = zfcp_fsf_fcp_cmnd(scpnt); in zfcp_scsi_queuecommand()
149 static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_abort_handler() argument
151 struct Scsi_Host *scsi_host = scpnt->device->host; in zfcp_scsi_eh_abort_handler()
156 unsigned long old_reqid = (unsigned long) scpnt->host_scribble; in zfcp_scsi_eh_abort_handler()
167 zfcp_dbf_scsi_abort("abrt_or", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
176 abrt_req = zfcp_fsf_abort_fcp_cmnd(scpnt); in zfcp_scsi_eh_abort_handler()
181 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_abort_handler()
183 zfcp_dbf_scsi_abort("abrt_bl", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
188 zfcp_dbf_scsi_abort("abrt_ru", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
193 zfcp_dbf_scsi_abort("abrt_ar", scpnt, NULL); in zfcp_scsi_eh_abort_handler()
207 zfcp_dbf_scsi_abort(dbf_tag, scpnt, abrt_req); in zfcp_scsi_eh_abort_handler()
212 static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags) in zfcp_task_mgmt_function() argument
214 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_task_mgmt_function()
221 fsf_req = zfcp_fsf_fcp_task_mgmt(scpnt, tm_flags); in zfcp_task_mgmt_function()
226 ret = fc_block_scsi_eh(scpnt); in zfcp_task_mgmt_function()
232 zfcp_dbf_scsi_devreset("nres", scpnt, tm_flags); in zfcp_task_mgmt_function()
242 zfcp_dbf_scsi_devreset("fail", scpnt, tm_flags); in zfcp_task_mgmt_function()
245 zfcp_dbf_scsi_devreset("okay", scpnt, tm_flags); in zfcp_task_mgmt_function()
251 static int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_device_reset_handler() argument
253 return zfcp_task_mgmt_function(scpnt, FCP_TMF_LUN_RESET); in zfcp_scsi_eh_device_reset_handler()
256 static int zfcp_scsi_eh_target_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_target_reset_handler() argument
258 return zfcp_task_mgmt_function(scpnt, FCP_TMF_TGT_RESET); in zfcp_scsi_eh_target_reset_handler()
261 static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) in zfcp_scsi_eh_host_reset_handler() argument
263 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); in zfcp_scsi_eh_host_reset_handler()
269 ret = fc_block_scsi_eh(scpnt); in zfcp_scsi_eh_host_reset_handler()