aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fc.h
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-11-24 10:54:11 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:02:14 -0500
commitbd0072ecc449fb2ea8f6a2c9f6ff308f3ae0b078 (patch)
treed58dc3bbac4a7e5c7fa44c009c4946b091eb9a88 /drivers/s390/scsi/zfcp_fc.h
parentdbf5dfe9dbcecf159139eec25ad256738cbc3715 (diff)
[SCSI] zfcp: Move WKA port to zfcp FC code
The well-known-address (WKA) port handling code is part of the FC code in zfcp. Move everything WKA related to the zfcp_fc files and use the common zfcp_fc prefix for structs and functions. Drop the unused key management service while renaming the struct, no request could ever reach this service in zfcp and it is obsolete anyway. 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_fc.h')
-rw-r--r--drivers/s390/scsi/zfcp_fc.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.h b/drivers/s390/scsi/zfcp_fc.h
index 12fc6ebbc244..9c787e043ff8 100644
--- a/drivers/s390/scsi/zfcp_fc.h
+++ b/drivers/s390/scsi/zfcp_fc.h
@@ -112,6 +112,56 @@ struct zfcp_fc_els_adisc {
112}; 112};
113 113
114/** 114/**
115 * enum zfcp_fc_wka_status - FC WKA port status in zfcp
116 * @ZFCP_FC_WKA_PORT_OFFLINE: Port is closed and not in use
117 * @ZFCP_FC_WKA_PORT_CLOSING: The FSF "close port" request is pending
118 * @ZFCP_FC_WKA_PORT_OPENING: The FSF "open port" request is pending
119 * @ZFCP_FC_WKA_PORT_ONLINE: The port is open and the port handle is valid
120 */
121enum zfcp_fc_wka_status {
122 ZFCP_FC_WKA_PORT_OFFLINE,
123 ZFCP_FC_WKA_PORT_CLOSING,
124 ZFCP_FC_WKA_PORT_OPENING,
125 ZFCP_FC_WKA_PORT_ONLINE,
126};
127
128/**
129 * struct zfcp_fc_wka_port - representation of well-known-address (WKA) FC port
130 * @adapter: Pointer to adapter structure this WKA port belongs to
131 * @completion_wq: Wait for completion of open/close command
132 * @status: Current status of WKA port
133 * @refcount: Reference count to keep port open as long as it is in use
134 * @d_id: FC destination id or well-known-address
135 * @handle: FSF handle for the open WKA port
136 * @mutex: Mutex used during opening/closing state changes
137 * @work: For delaying the closing of the WKA port
138 */
139struct zfcp_fc_wka_port {
140 struct zfcp_adapter *adapter;
141 wait_queue_head_t completion_wq;
142 enum zfcp_fc_wka_status status;
143 atomic_t refcount;
144 u32 d_id;
145 u32 handle;
146 struct mutex mutex;
147 struct delayed_work work;
148};
149
150/**
151 * struct zfcp_fc_wka_ports - Data structures for FC generic services
152 * @ms: FC Management service
153 * @ts: FC time service
154 * @ds: FC directory service
155 * @as: FC alias service
156 */
157struct zfcp_fc_wka_ports {
158 struct zfcp_fc_wka_port ms;
159 struct zfcp_fc_wka_port ts;
160 struct zfcp_fc_wka_port ds;
161 struct zfcp_fc_wka_port as;
162};
163
164/**
115 * zfcp_fc_scsi_to_fcp - setup FCP command with data from scsi_cmnd 165 * zfcp_fc_scsi_to_fcp - setup FCP command with data from scsi_cmnd
116 * @fcp: fcp_cmnd to setup 166 * @fcp: fcp_cmnd to setup
117 * @scsi: scsi_cmnd where to get LUN, task attributes/flags and CDB 167 * @scsi: scsi_cmnd where to get LUN, task attributes/flags and CDB