diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-08-18 09:43:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-05 09:49:32 -0400 |
commit | d5a282a1c5084ec7ebd9e6ab9723317f6b3fcd7b (patch) | |
tree | a215cde519ca65b129d35d8d435061b48ab3864c /drivers/s390/scsi/zfcp_fc.c | |
parent | 5771710bd5edfafcb8656f49b93690a6fae5a4d2 (diff) |
[SCSI] zfcp: introduce _setup, _destroy for qdio and FC
Extract independent data structures and introduce common _setup and
_destroy routines for QDIO and Fibre Channel related data structures
Signed-off-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_fc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 309f1dfad3f9..db8bb41a7794 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -141,17 +141,6 @@ void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *gs) | |||
141 | zfcp_fc_wka_port_force_offline(&gs->ks); | 141 | zfcp_fc_wka_port_force_offline(&gs->ks); |
142 | } | 142 | } |
143 | 143 | ||
144 | void zfcp_fc_wka_ports_init(struct zfcp_adapter *adapter) | ||
145 | { | ||
146 | struct zfcp_wka_ports *gs = adapter->gs; | ||
147 | |||
148 | zfcp_fc_wka_port_init(&gs->ms, FC_FID_MGMT_SERV, adapter); | ||
149 | zfcp_fc_wka_port_init(&gs->ts, FC_FID_TIME_SERV, adapter); | ||
150 | zfcp_fc_wka_port_init(&gs->ds, FC_FID_DIR_SERV, adapter); | ||
151 | zfcp_fc_wka_port_init(&gs->as, FC_FID_ALIASES, adapter); | ||
152 | zfcp_fc_wka_port_init(&gs->ks, FC_FID_SEC_KEY, adapter); | ||
153 | } | ||
154 | |||
155 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | 144 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, |
156 | struct fcp_rscn_element *elem) | 145 | struct fcp_rscn_element *elem) |
157 | { | 146 | { |
@@ -870,3 +859,28 @@ int zfcp_fc_execute_ct_fc_job(struct fc_bsg_job *job) | |||
870 | } | 859 | } |
871 | return ret; | 860 | return ret; |
872 | } | 861 | } |
862 | |||
863 | int zfcp_fc_gs_setup(struct zfcp_adapter *adapter) | ||
864 | { | ||
865 | struct zfcp_wka_ports *wka_ports; | ||
866 | |||
867 | wka_ports = kzalloc(sizeof(struct zfcp_wka_ports), GFP_KERNEL); | ||
868 | if (!wka_ports) | ||
869 | return -ENOMEM; | ||
870 | |||
871 | adapter->gs = wka_ports; | ||
872 | zfcp_fc_wka_port_init(&wka_ports->ms, FC_FID_MGMT_SERV, adapter); | ||
873 | zfcp_fc_wka_port_init(&wka_ports->ts, FC_FID_TIME_SERV, adapter); | ||
874 | zfcp_fc_wka_port_init(&wka_ports->ds, FC_FID_DIR_SERV, adapter); | ||
875 | zfcp_fc_wka_port_init(&wka_ports->as, FC_FID_ALIASES, adapter); | ||
876 | zfcp_fc_wka_port_init(&wka_ports->ks, FC_FID_SEC_KEY, adapter); | ||
877 | |||
878 | return 0; | ||
879 | } | ||
880 | |||
881 | void zfcp_fc_gs_destroy(struct zfcp_adapter *adapter) | ||
882 | { | ||
883 | kfree(adapter->gs); | ||
884 | adapter->gs = NULL; | ||
885 | } | ||
886 | |||