summaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-11-24 16:54:13 +0100
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 19:02:15 +0100
commit7c7dc196814b9e1d5cc254dc579a5fa78ae524f7 (patch)
treeefe4800a456fa97e1f10876840fbde0983264b18 /drivers/s390/scsi/zfcp_scsi.c
parent[SCSI] zfcp: Remove ZFCP_DID_MASK (diff)
downloadlinux-7c7dc196814b9e1d5cc254dc579a5fa78ae524f7.tar.xz
linux-7c7dc196814b9e1d5cc254dc579a5fa78ae524f7.zip
[SCSI] zfcp: Simplify handling of ct and els requests
Remove some redundancies in FC related code and trace: - drop redundant data from SAN trace (local s_id that only changes during link down, ls_code that is already part of payload, d_id in ct response trace that is always the same as in ct request trace) - use one common fsf struct to hold zfcp data for ct and els requests - leverage common fsf struct for FC passthrough job data, allocate it with dd_bsg_data for passthrough requests and unify common code for ct and els passthrough request - simplify callback handling in zfcp_fc Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 3d168410036b..535f36cf2819 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -14,6 +14,7 @@
#include <asm/atomic.h>
#include "zfcp_ext.h"
#include "zfcp_dbf.h"
+#include "zfcp_fc.h"
static unsigned int default_depth = 32;
module_param_named(queue_depth, default_depth, uint, 0600);
@@ -628,20 +629,6 @@ void zfcp_scsi_scan(struct work_struct *work)
put_device(&unit->sysfs_device);
}
-static int zfcp_execute_fc_job(struct fc_bsg_job *job)
-{
- switch (job->request->msgcode) {
- case FC_BSG_RPT_ELS:
- case FC_BSG_HST_ELS_NOLOGIN:
- return zfcp_fc_execute_els_fc_job(job);
- case FC_BSG_RPT_CT:
- case FC_BSG_HST_CT:
- return zfcp_fc_execute_ct_fc_job(job);
- default:
- return -EINVAL;
- }
-}
-
struct fc_function_template zfcp_transport_functions = {
.show_starget_port_id = 1,
.show_starget_port_name = 1,
@@ -662,13 +649,14 @@ struct fc_function_template zfcp_transport_functions = {
.get_host_port_state = zfcp_get_host_port_state,
.terminate_rport_io = zfcp_scsi_terminate_rport_io,
.show_host_port_state = 1,
- .bsg_request = zfcp_execute_fc_job,
+ .bsg_request = zfcp_fc_exec_bsg_job,
/* no functions registered for following dynamic attributes but
directly set by LLDD */
.show_host_port_type = 1,
.show_host_speed = 1,
.show_host_port_id = 1,
.disable_target_scan = 1,
+ .dd_bsg_size = sizeof(struct zfcp_fsf_ct_els),
};
struct zfcp_data zfcp_data = {