Lines Matching refs:sdev

36 static void zfcp_scsi_slave_destroy(struct scsi_device *sdev)  in zfcp_scsi_slave_destroy()  argument
38 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); in zfcp_scsi_slave_destroy()
44 zfcp_erp_lun_shutdown_wait(sdev, "scssd_1"); in zfcp_scsi_slave_destroy()
109 static int zfcp_scsi_slave_alloc(struct scsi_device *sdev) in zfcp_scsi_slave_alloc() argument
111 struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); in zfcp_scsi_slave_alloc()
113 (struct zfcp_adapter *) sdev->host->hostdata[0]; in zfcp_scsi_slave_alloc()
114 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); in zfcp_scsi_slave_alloc()
120 zfcp_sdev->erp_action.sdev = sdev; in zfcp_scsi_slave_alloc()
137 unit = zfcp_unit_find(port, zfcp_scsi_dev_lun(sdev)); in zfcp_scsi_slave_alloc()
155 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_RUNNING); in zfcp_scsi_slave_alloc()
156 zfcp_erp_lun_reopen(sdev, 0, "scsla_1"); in zfcp_scsi_slave_alloc()
283 static int zfcp_scsi_task_mgmt_function(struct scsi_device *sdev, u8 tm_flags) in zfcp_scsi_task_mgmt_function() argument
285 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); in zfcp_scsi_task_mgmt_function()
287 struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); in zfcp_scsi_task_mgmt_function()
293 fsf_req = zfcp_fsf_fcp_task_mgmt(sdev, tm_flags); in zfcp_scsi_task_mgmt_function()
297 zfcp_dbf_scsi_devreset("wait", sdev, tm_flags, NULL); in zfcp_scsi_task_mgmt_function()
301 zfcp_dbf_scsi_devreset("fiof", sdev, tm_flags, NULL); in zfcp_scsi_task_mgmt_function()
307 zfcp_dbf_scsi_devreset("nres", sdev, tm_flags, NULL); in zfcp_scsi_task_mgmt_function()
312 zfcp_dbf_scsi_devreset("reqf", sdev, tm_flags, NULL); in zfcp_scsi_task_mgmt_function()
319 zfcp_dbf_scsi_devreset("fail", sdev, tm_flags, fsf_req); in zfcp_scsi_task_mgmt_function()
322 zfcp_dbf_scsi_devreset("okay", sdev, tm_flags, fsf_req); in zfcp_scsi_task_mgmt_function()
332 struct scsi_device *sdev = scpnt->device; in zfcp_scsi_eh_device_reset_handler() local
334 return zfcp_scsi_task_mgmt_function(sdev, FCP_TMF_LUN_RESET); in zfcp_scsi_eh_device_reset_handler()
342 struct scsi_device *sdev = NULL, *tmp_sdev; in zfcp_scsi_eh_target_reset_handler() local
349 sdev = tmp_sdev; in zfcp_scsi_eh_target_reset_handler()
353 if (!sdev) { in zfcp_scsi_eh_target_reset_handler()
359 ret = zfcp_scsi_task_mgmt_function(sdev, FCP_TMF_TGT_RESET); in zfcp_scsi_eh_target_reset_handler()
362 if (sdev) in zfcp_scsi_eh_target_reset_handler()