diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 5 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 31 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 6 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 44 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.h | 50 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 22 |
6 files changed, 90 insertions, 68 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index d7a550af4a25..e945344ff711 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/debug.h> | 13 | #include <asm/debug.h> |
14 | #include "zfcp_dbf.h" | 14 | #include "zfcp_dbf.h" |
15 | #include "zfcp_ext.h" | 15 | #include "zfcp_ext.h" |
16 | #include "zfcp_fc.h" | ||
16 | 17 | ||
17 | static u32 dbfsize = 4; | 18 | static u32 dbfsize = 4; |
18 | 19 | ||
@@ -681,7 +682,7 @@ void zfcp_dbf_rec_action(char *id2, struct zfcp_erp_action *erp_action) | |||
681 | void zfcp_dbf_san_ct_request(struct zfcp_fsf_req *fsf_req) | 682 | void zfcp_dbf_san_ct_request(struct zfcp_fsf_req *fsf_req) |
682 | { | 683 | { |
683 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; | 684 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; |
684 | struct zfcp_wka_port *wka_port = ct->wka_port; | 685 | struct zfcp_fc_wka_port *wka_port = ct->wka_port; |
685 | struct zfcp_adapter *adapter = wka_port->adapter; | 686 | struct zfcp_adapter *adapter = wka_port->adapter; |
686 | struct zfcp_dbf *dbf = adapter->dbf; | 687 | struct zfcp_dbf *dbf = adapter->dbf; |
687 | struct fc_ct_hdr *hdr = sg_virt(ct->req); | 688 | struct fc_ct_hdr *hdr = sg_virt(ct->req); |
@@ -718,7 +719,7 @@ void zfcp_dbf_san_ct_request(struct zfcp_fsf_req *fsf_req) | |||
718 | void zfcp_dbf_san_ct_response(struct zfcp_fsf_req *fsf_req) | 719 | void zfcp_dbf_san_ct_response(struct zfcp_fsf_req *fsf_req) |
719 | { | 720 | { |
720 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; | 721 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; |
721 | struct zfcp_wka_port *wka_port = ct->wka_port; | 722 | struct zfcp_fc_wka_port *wka_port = ct->wka_port; |
722 | struct zfcp_adapter *adapter = wka_port->adapter; | 723 | struct zfcp_adapter *adapter = wka_port->adapter; |
723 | struct fc_ct_hdr *hdr = sg_virt(ct->resp); | 724 | struct fc_ct_hdr *hdr = sg_virt(ct->resp); |
724 | struct zfcp_dbf *dbf = adapter->dbf; | 725 | struct zfcp_dbf *dbf = adapter->dbf; |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index c64821145475..c00aa2b174a1 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -104,14 +104,6 @@ | |||
104 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 | 104 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 |
105 | #define ZFCP_STATUS_PORT_LINK_TEST 0x00000002 | 105 | #define ZFCP_STATUS_PORT_LINK_TEST 0x00000002 |
106 | 106 | ||
107 | /* well known address (WKA) port status*/ | ||
108 | enum zfcp_wka_status { | ||
109 | ZFCP_WKA_PORT_OFFLINE, | ||
110 | ZFCP_WKA_PORT_CLOSING, | ||
111 | ZFCP_WKA_PORT_OPENING, | ||
112 | ZFCP_WKA_PORT_ONLINE, | ||
113 | }; | ||
114 | |||
115 | /* logical unit status */ | 107 | /* logical unit status */ |
116 | #define ZFCP_STATUS_UNIT_SHARED 0x00000004 | 108 | #define ZFCP_STATUS_UNIT_SHARED 0x00000004 |
117 | #define ZFCP_STATUS_UNIT_READONLY 0x00000008 | 109 | #define ZFCP_STATUS_UNIT_READONLY 0x00000008 |
@@ -155,7 +147,7 @@ struct zfcp_adapter_mempool { | |||
155 | * @status: used to pass error status to calling function | 147 | * @status: used to pass error status to calling function |
156 | */ | 148 | */ |
157 | struct zfcp_send_ct { | 149 | struct zfcp_send_ct { |
158 | struct zfcp_wka_port *wka_port; | 150 | struct zfcp_fc_wka_port *wka_port; |
159 | struct scatterlist *req; | 151 | struct scatterlist *req; |
160 | struct scatterlist *resp; | 152 | struct scatterlist *resp; |
161 | void (*handler)(unsigned long); | 153 | void (*handler)(unsigned long); |
@@ -190,25 +182,6 @@ struct zfcp_send_els { | |||
190 | int status; | 182 | int status; |
191 | }; | 183 | }; |
192 | 184 | ||
193 | struct zfcp_wka_port { | ||
194 | struct zfcp_adapter *adapter; | ||
195 | wait_queue_head_t completion_wq; | ||
196 | enum zfcp_wka_status status; | ||
197 | atomic_t refcount; | ||
198 | u32 d_id; | ||
199 | u32 handle; | ||
200 | struct mutex mutex; | ||
201 | struct delayed_work work; | ||
202 | }; | ||
203 | |||
204 | struct zfcp_wka_ports { | ||
205 | struct zfcp_wka_port ms; /* management service */ | ||
206 | struct zfcp_wka_port ts; /* time service */ | ||
207 | struct zfcp_wka_port ds; /* directory service */ | ||
208 | struct zfcp_wka_port as; /* alias service */ | ||
209 | struct zfcp_wka_port ks; /* key distribution service */ | ||
210 | }; | ||
211 | |||
212 | struct zfcp_qdio_queue { | 185 | struct zfcp_qdio_queue { |
213 | struct qdio_buffer *sbal[QDIO_MAX_BUFFERS_PER_Q]; | 186 | struct qdio_buffer *sbal[QDIO_MAX_BUFFERS_PER_Q]; |
214 | u8 first; /* index of next free bfr in queue */ | 187 | u8 first; /* index of next free bfr in queue */ |
@@ -309,7 +282,7 @@ struct zfcp_adapter { | |||
309 | u32 erp_low_mem_count; /* nr of erp actions waiting | 282 | u32 erp_low_mem_count; /* nr of erp actions waiting |
310 | for memory */ | 283 | for memory */ |
311 | struct task_struct *erp_thread; | 284 | struct task_struct *erp_thread; |
312 | struct zfcp_wka_ports *gs; /* generic services */ | 285 | struct zfcp_fc_wka_ports *gs; /* generic services */ |
313 | struct zfcp_dbf *dbf; /* debug traces */ | 286 | struct zfcp_dbf *dbf; /* debug traces */ |
314 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ | 287 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ |
315 | struct fc_host_statistics *fc_stats; | 288 | struct fc_host_statistics *fc_stats; |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index c2b23b5a3d0a..6a2d6e390b68 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -103,7 +103,7 @@ extern void zfcp_fc_trigger_did_lookup(struct zfcp_port *); | |||
103 | extern void zfcp_fc_plogi_evaluate(struct zfcp_port *, struct fc_els_flogi *); | 103 | extern void zfcp_fc_plogi_evaluate(struct zfcp_port *, struct fc_els_flogi *); |
104 | extern void zfcp_fc_test_link(struct zfcp_port *); | 104 | extern void zfcp_fc_test_link(struct zfcp_port *); |
105 | extern void zfcp_fc_link_test_work(struct work_struct *); | 105 | extern void zfcp_fc_link_test_work(struct work_struct *); |
106 | extern void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *); | 106 | extern void zfcp_fc_wka_ports_force_offline(struct zfcp_fc_wka_ports *); |
107 | extern int zfcp_fc_gs_setup(struct zfcp_adapter *); | 107 | extern int zfcp_fc_gs_setup(struct zfcp_adapter *); |
108 | extern void zfcp_fc_gs_destroy(struct zfcp_adapter *); | 108 | extern void zfcp_fc_gs_destroy(struct zfcp_adapter *); |
109 | extern int zfcp_fc_execute_els_fc_job(struct fc_bsg_job *); | 109 | extern int zfcp_fc_execute_els_fc_job(struct fc_bsg_job *); |
@@ -111,8 +111,8 @@ extern int zfcp_fc_execute_ct_fc_job(struct fc_bsg_job *); | |||
111 | 111 | ||
112 | /* zfcp_fsf.c */ | 112 | /* zfcp_fsf.c */ |
113 | extern int zfcp_fsf_open_port(struct zfcp_erp_action *); | 113 | extern int zfcp_fsf_open_port(struct zfcp_erp_action *); |
114 | extern int zfcp_fsf_open_wka_port(struct zfcp_wka_port *); | 114 | extern int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *); |
115 | extern int zfcp_fsf_close_wka_port(struct zfcp_wka_port *); | 115 | extern int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *); |
116 | extern int zfcp_fsf_close_port(struct zfcp_erp_action *); | 116 | extern int zfcp_fsf_close_port(struct zfcp_erp_action *); |
117 | extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *); | 117 | extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *); |
118 | extern int zfcp_fsf_open_unit(struct zfcp_erp_action *); | 118 | extern int zfcp_fsf_open_unit(struct zfcp_erp_action *); |
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 7c306a5ef4dd..d6d1e78ba0f9 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -28,25 +28,25 @@ struct zfcp_fc_ns_handler_data { | |||
28 | unsigned long handler_data; | 28 | unsigned long handler_data; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static int zfcp_fc_wka_port_get(struct zfcp_wka_port *wka_port) | 31 | static int zfcp_fc_wka_port_get(struct zfcp_fc_wka_port *wka_port) |
32 | { | 32 | { |
33 | if (mutex_lock_interruptible(&wka_port->mutex)) | 33 | if (mutex_lock_interruptible(&wka_port->mutex)) |
34 | return -ERESTARTSYS; | 34 | return -ERESTARTSYS; |
35 | 35 | ||
36 | if (wka_port->status == ZFCP_WKA_PORT_OFFLINE || | 36 | if (wka_port->status == ZFCP_FC_WKA_PORT_OFFLINE || |
37 | wka_port->status == ZFCP_WKA_PORT_CLOSING) { | 37 | wka_port->status == ZFCP_FC_WKA_PORT_CLOSING) { |
38 | wka_port->status = ZFCP_WKA_PORT_OPENING; | 38 | wka_port->status = ZFCP_FC_WKA_PORT_OPENING; |
39 | if (zfcp_fsf_open_wka_port(wka_port)) | 39 | if (zfcp_fsf_open_wka_port(wka_port)) |
40 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 40 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
41 | } | 41 | } |
42 | 42 | ||
43 | mutex_unlock(&wka_port->mutex); | 43 | mutex_unlock(&wka_port->mutex); |
44 | 44 | ||
45 | wait_event(wka_port->completion_wq, | 45 | wait_event(wka_port->completion_wq, |
46 | wka_port->status == ZFCP_WKA_PORT_ONLINE || | 46 | wka_port->status == ZFCP_FC_WKA_PORT_ONLINE || |
47 | wka_port->status == ZFCP_WKA_PORT_OFFLINE); | 47 | wka_port->status == ZFCP_FC_WKA_PORT_OFFLINE); |
48 | 48 | ||
49 | if (wka_port->status == ZFCP_WKA_PORT_ONLINE) { | 49 | if (wka_port->status == ZFCP_FC_WKA_PORT_ONLINE) { |
50 | atomic_inc(&wka_port->refcount); | 50 | atomic_inc(&wka_port->refcount); |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
@@ -56,24 +56,24 @@ static int zfcp_fc_wka_port_get(struct zfcp_wka_port *wka_port) | |||
56 | static void zfcp_fc_wka_port_offline(struct work_struct *work) | 56 | static void zfcp_fc_wka_port_offline(struct work_struct *work) |
57 | { | 57 | { |
58 | struct delayed_work *dw = to_delayed_work(work); | 58 | struct delayed_work *dw = to_delayed_work(work); |
59 | struct zfcp_wka_port *wka_port = | 59 | struct zfcp_fc_wka_port *wka_port = |
60 | container_of(dw, struct zfcp_wka_port, work); | 60 | container_of(dw, struct zfcp_fc_wka_port, work); |
61 | 61 | ||
62 | mutex_lock(&wka_port->mutex); | 62 | mutex_lock(&wka_port->mutex); |
63 | if ((atomic_read(&wka_port->refcount) != 0) || | 63 | if ((atomic_read(&wka_port->refcount) != 0) || |
64 | (wka_port->status != ZFCP_WKA_PORT_ONLINE)) | 64 | (wka_port->status != ZFCP_FC_WKA_PORT_ONLINE)) |
65 | goto out; | 65 | goto out; |
66 | 66 | ||
67 | wka_port->status = ZFCP_WKA_PORT_CLOSING; | 67 | wka_port->status = ZFCP_FC_WKA_PORT_CLOSING; |
68 | if (zfcp_fsf_close_wka_port(wka_port)) { | 68 | if (zfcp_fsf_close_wka_port(wka_port)) { |
69 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 69 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
70 | wake_up(&wka_port->completion_wq); | 70 | wake_up(&wka_port->completion_wq); |
71 | } | 71 | } |
72 | out: | 72 | out: |
73 | mutex_unlock(&wka_port->mutex); | 73 | mutex_unlock(&wka_port->mutex); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void zfcp_fc_wka_port_put(struct zfcp_wka_port *wka_port) | 76 | static void zfcp_fc_wka_port_put(struct zfcp_fc_wka_port *wka_port) |
77 | { | 77 | { |
78 | if (atomic_dec_return(&wka_port->refcount) != 0) | 78 | if (atomic_dec_return(&wka_port->refcount) != 0) |
79 | return; | 79 | return; |
@@ -81,7 +81,7 @@ static void zfcp_fc_wka_port_put(struct zfcp_wka_port *wka_port) | |||
81 | schedule_delayed_work(&wka_port->work, HZ / 100); | 81 | schedule_delayed_work(&wka_port->work, HZ / 100); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void zfcp_fc_wka_port_init(struct zfcp_wka_port *wka_port, u32 d_id, | 84 | static void zfcp_fc_wka_port_init(struct zfcp_fc_wka_port *wka_port, u32 d_id, |
85 | struct zfcp_adapter *adapter) | 85 | struct zfcp_adapter *adapter) |
86 | { | 86 | { |
87 | init_waitqueue_head(&wka_port->completion_wq); | 87 | init_waitqueue_head(&wka_port->completion_wq); |
@@ -89,21 +89,21 @@ static void zfcp_fc_wka_port_init(struct zfcp_wka_port *wka_port, u32 d_id, | |||
89 | wka_port->adapter = adapter; | 89 | wka_port->adapter = adapter; |
90 | wka_port->d_id = d_id; | 90 | wka_port->d_id = d_id; |
91 | 91 | ||
92 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 92 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
93 | atomic_set(&wka_port->refcount, 0); | 93 | atomic_set(&wka_port->refcount, 0); |
94 | mutex_init(&wka_port->mutex); | 94 | mutex_init(&wka_port->mutex); |
95 | INIT_DELAYED_WORK(&wka_port->work, zfcp_fc_wka_port_offline); | 95 | INIT_DELAYED_WORK(&wka_port->work, zfcp_fc_wka_port_offline); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka) | 98 | static void zfcp_fc_wka_port_force_offline(struct zfcp_fc_wka_port *wka) |
99 | { | 99 | { |
100 | cancel_delayed_work_sync(&wka->work); | 100 | cancel_delayed_work_sync(&wka->work); |
101 | mutex_lock(&wka->mutex); | 101 | mutex_lock(&wka->mutex); |
102 | wka->status = ZFCP_WKA_PORT_OFFLINE; | 102 | wka->status = ZFCP_FC_WKA_PORT_OFFLINE; |
103 | mutex_unlock(&wka->mutex); | 103 | mutex_unlock(&wka->mutex); |
104 | } | 104 | } |
105 | 105 | ||
106 | void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *gs) | 106 | void zfcp_fc_wka_ports_force_offline(struct zfcp_fc_wka_ports *gs) |
107 | { | 107 | { |
108 | if (!gs) | 108 | if (!gs) |
109 | return; | 109 | return; |
@@ -111,7 +111,6 @@ void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *gs) | |||
111 | zfcp_fc_wka_port_force_offline(&gs->ts); | 111 | zfcp_fc_wka_port_force_offline(&gs->ts); |
112 | zfcp_fc_wka_port_force_offline(&gs->ds); | 112 | zfcp_fc_wka_port_force_offline(&gs->ds); |
113 | zfcp_fc_wka_port_force_offline(&gs->as); | 113 | zfcp_fc_wka_port_force_offline(&gs->as); |
114 | zfcp_fc_wka_port_force_offline(&gs->ks); | ||
115 | } | 114 | } |
116 | 115 | ||
117 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | 116 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, |
@@ -834,9 +833,9 @@ int zfcp_fc_execute_ct_fc_job(struct fc_bsg_job *job) | |||
834 | 833 | ||
835 | int zfcp_fc_gs_setup(struct zfcp_adapter *adapter) | 834 | int zfcp_fc_gs_setup(struct zfcp_adapter *adapter) |
836 | { | 835 | { |
837 | struct zfcp_wka_ports *wka_ports; | 836 | struct zfcp_fc_wka_ports *wka_ports; |
838 | 837 | ||
839 | wka_ports = kzalloc(sizeof(struct zfcp_wka_ports), GFP_KERNEL); | 838 | wka_ports = kzalloc(sizeof(struct zfcp_fc_wka_ports), GFP_KERNEL); |
840 | if (!wka_ports) | 839 | if (!wka_ports) |
841 | return -ENOMEM; | 840 | return -ENOMEM; |
842 | 841 | ||
@@ -845,7 +844,6 @@ int zfcp_fc_gs_setup(struct zfcp_adapter *adapter) | |||
845 | zfcp_fc_wka_port_init(&wka_ports->ts, FC_FID_TIME_SERV, adapter); | 844 | zfcp_fc_wka_port_init(&wka_ports->ts, FC_FID_TIME_SERV, adapter); |
846 | zfcp_fc_wka_port_init(&wka_ports->ds, FC_FID_DIR_SERV, adapter); | 845 | zfcp_fc_wka_port_init(&wka_ports->ds, FC_FID_DIR_SERV, adapter); |
847 | zfcp_fc_wka_port_init(&wka_ports->as, FC_FID_ALIASES, adapter); | 846 | zfcp_fc_wka_port_init(&wka_ports->as, FC_FID_ALIASES, adapter); |
848 | zfcp_fc_wka_port_init(&wka_ports->ks, FC_FID_SEC_KEY, adapter); | ||
849 | 847 | ||
850 | return 0; | 848 | return 0; |
851 | } | 849 | } |
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 | */ | ||
121 | enum 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 | */ | ||
139 | struct 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 | */ | ||
157 | struct 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 |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 9d7bf965d398..9ada555ca5a8 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -1096,7 +1096,7 @@ static int zfcp_fsf_setup_ct_els(struct zfcp_fsf_req *req, | |||
1096 | */ | 1096 | */ |
1097 | int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool) | 1097 | int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool) |
1098 | { | 1098 | { |
1099 | struct zfcp_wka_port *wka_port = ct->wka_port; | 1099 | struct zfcp_fc_wka_port *wka_port = ct->wka_port; |
1100 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; | 1100 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; |
1101 | struct zfcp_fsf_req *req; | 1101 | struct zfcp_fsf_req *req; |
1102 | int ret = -EIO; | 1102 | int ret = -EIO; |
@@ -1610,11 +1610,11 @@ out: | |||
1610 | 1610 | ||
1611 | static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) | 1611 | static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) |
1612 | { | 1612 | { |
1613 | struct zfcp_wka_port *wka_port = req->data; | 1613 | struct zfcp_fc_wka_port *wka_port = req->data; |
1614 | struct fsf_qtcb_header *header = &req->qtcb->header; | 1614 | struct fsf_qtcb_header *header = &req->qtcb->header; |
1615 | 1615 | ||
1616 | if (req->status & ZFCP_STATUS_FSFREQ_ERROR) { | 1616 | if (req->status & ZFCP_STATUS_FSFREQ_ERROR) { |
1617 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 1617 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
1618 | goto out; | 1618 | goto out; |
1619 | } | 1619 | } |
1620 | 1620 | ||
@@ -1627,13 +1627,13 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) | |||
1627 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1627 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1628 | /* fall through */ | 1628 | /* fall through */ |
1629 | case FSF_ACCESS_DENIED: | 1629 | case FSF_ACCESS_DENIED: |
1630 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 1630 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
1631 | break; | 1631 | break; |
1632 | case FSF_GOOD: | 1632 | case FSF_GOOD: |
1633 | wka_port->handle = header->port_handle; | 1633 | wka_port->handle = header->port_handle; |
1634 | /* fall through */ | 1634 | /* fall through */ |
1635 | case FSF_PORT_ALREADY_OPEN: | 1635 | case FSF_PORT_ALREADY_OPEN: |
1636 | wka_port->status = ZFCP_WKA_PORT_ONLINE; | 1636 | wka_port->status = ZFCP_FC_WKA_PORT_ONLINE; |
1637 | } | 1637 | } |
1638 | out: | 1638 | out: |
1639 | wake_up(&wka_port->completion_wq); | 1639 | wake_up(&wka_port->completion_wq); |
@@ -1641,10 +1641,10 @@ out: | |||
1641 | 1641 | ||
1642 | /** | 1642 | /** |
1643 | * zfcp_fsf_open_wka_port - create and send open wka-port request | 1643 | * zfcp_fsf_open_wka_port - create and send open wka-port request |
1644 | * @wka_port: pointer to struct zfcp_wka_port | 1644 | * @wka_port: pointer to struct zfcp_fc_wka_port |
1645 | * Returns: 0 on success, error otherwise | 1645 | * Returns: 0 on success, error otherwise |
1646 | */ | 1646 | */ |
1647 | int zfcp_fsf_open_wka_port(struct zfcp_wka_port *wka_port) | 1647 | int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port) |
1648 | { | 1648 | { |
1649 | struct qdio_buffer_element *sbale; | 1649 | struct qdio_buffer_element *sbale; |
1650 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; | 1650 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; |
@@ -1683,23 +1683,23 @@ out: | |||
1683 | 1683 | ||
1684 | static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req) | 1684 | static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req) |
1685 | { | 1685 | { |
1686 | struct zfcp_wka_port *wka_port = req->data; | 1686 | struct zfcp_fc_wka_port *wka_port = req->data; |
1687 | 1687 | ||
1688 | if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) { | 1688 | if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) { |
1689 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1689 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1690 | zfcp_erp_adapter_reopen(wka_port->adapter, 0, "fscwph1", req); | 1690 | zfcp_erp_adapter_reopen(wka_port->adapter, 0, "fscwph1", req); |
1691 | } | 1691 | } |
1692 | 1692 | ||
1693 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 1693 | wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; |
1694 | wake_up(&wka_port->completion_wq); | 1694 | wake_up(&wka_port->completion_wq); |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | /** | 1697 | /** |
1698 | * zfcp_fsf_close_wka_port - create and send close wka port request | 1698 | * zfcp_fsf_close_wka_port - create and send close wka port request |
1699 | * @erp_action: pointer to struct zfcp_erp_action | 1699 | * @wka_port: WKA port to open |
1700 | * Returns: 0 on success, error otherwise | 1700 | * Returns: 0 on success, error otherwise |
1701 | */ | 1701 | */ |
1702 | int zfcp_fsf_close_wka_port(struct zfcp_wka_port *wka_port) | 1702 | int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port) |
1703 | { | 1703 | { |
1704 | struct qdio_buffer_element *sbale; | 1704 | struct qdio_buffer_element *sbale; |
1705 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; | 1705 | struct zfcp_qdio *qdio = wka_port->adapter->qdio; |