aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2008-04-18 06:51:55 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-18 12:50:17 -0400
commit1f6f7129ebac007629b28764bfa5147817682692 (patch)
tree4e0420ff91ed617a97e48b0db81d334e5ba80935 /drivers
parent99773aab0377ee5bcaf37b7cd2577c3465422dab (diff)
[SCSI] zfcp: fix 31 bit compile warnings
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_rscn’: drivers/s390/scsi/zfcp_aux.c:1379: warning: cast from pointer to integer of different size drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_plogi’: drivers/s390/scsi/zfcp_aux.c:1432: warning: cast from pointer to integer of different size drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_logo’: drivers/s390/scsi/zfcp_aux.c:1457: warning: cast from pointer to integer of different size .. Just passing pointers rids us of these warnings and improves readability. Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c6
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c19
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c22
-rw-r--r--drivers/s390/scsi/zfcp_erp.c140
-rw-r--r--drivers/s390/scsi/zfcp_ext.h60
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c149
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c3
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c4
-rw-r--r--drivers/s390/scsi/zfcp_sysfs_adapter.c9
-rw-r--r--drivers/s390/scsi/zfcp_sysfs_port.c8
-rw-r--r--drivers/s390/scsi/zfcp_sysfs_unit.c4
11 files changed, 211 insertions, 213 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 05a33c247c68..8c7e2b778ef1 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1376,7 +1376,7 @@ static void zfcp_fsf_incoming_els_rscn(struct zfcp_fsf_req *fsf_req)
1376 "port 0x%016Lx\n", port->wwpn); 1376 "port 0x%016Lx\n", port->wwpn);
1377 zfcp_erp_port_reopen(port, 1377 zfcp_erp_port_reopen(port,
1378 ZFCP_STATUS_COMMON_ERP_FAILED, 1378 ZFCP_STATUS_COMMON_ERP_FAILED,
1379 82, (u64)fsf_req); 1379 82, fsf_req);
1380 continue; 1380 continue;
1381 } 1381 }
1382 1382
@@ -1429,7 +1429,7 @@ static void zfcp_fsf_incoming_els_plogi(struct zfcp_fsf_req *fsf_req)
1429 status_buffer->d_id, 1429 status_buffer->d_id,
1430 zfcp_get_busid_by_adapter(adapter)); 1430 zfcp_get_busid_by_adapter(adapter));
1431 } else { 1431 } else {
1432 zfcp_erp_port_forced_reopen(port, 0, 83, (u64)fsf_req); 1432 zfcp_erp_port_forced_reopen(port, 0, 83, fsf_req);
1433 } 1433 }
1434} 1434}
1435 1435
@@ -1454,7 +1454,7 @@ static void zfcp_fsf_incoming_els_logo(struct zfcp_fsf_req *fsf_req)
1454 status_buffer->d_id, 1454 status_buffer->d_id,
1455 zfcp_get_busid_by_adapter(adapter)); 1455 zfcp_get_busid_by_adapter(adapter));
1456 } else { 1456 } else {
1457 zfcp_erp_port_forced_reopen(port, 0, 84, (u64)fsf_req); 1457 zfcp_erp_port_forced_reopen(port, 0, 84, fsf_req);
1458 } 1458 }
1459} 1459}
1460 1460
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index db9f538362a6..66d3b88844b0 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -170,9 +170,10 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device)
170 BUG_ON(!zfcp_reqlist_isempty(adapter)); 170 BUG_ON(!zfcp_reqlist_isempty(adapter));
171 adapter->req_no = 0; 171 adapter->req_no = 0;
172 172
173 zfcp_erp_modify_adapter_status(adapter, 10, 0, 173 zfcp_erp_modify_adapter_status(adapter, 10, NULL,
174 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); 174 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
175 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, 0); 175 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
176 NULL);
176 zfcp_erp_wait(adapter); 177 zfcp_erp_wait(adapter);
177 goto out; 178 goto out;
178 179
@@ -197,7 +198,7 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device)
197 198
198 down(&zfcp_data.config_sema); 199 down(&zfcp_data.config_sema);
199 adapter = dev_get_drvdata(&ccw_device->dev); 200 adapter = dev_get_drvdata(&ccw_device->dev);
200 zfcp_erp_adapter_shutdown(adapter, 0, 86, 0); 201 zfcp_erp_adapter_shutdown(adapter, 0, 86, NULL);
201 zfcp_erp_wait(adapter); 202 zfcp_erp_wait(adapter);
202 zfcp_erp_thread_kill(adapter); 203 zfcp_erp_thread_kill(adapter);
203 up(&zfcp_data.config_sema); 204 up(&zfcp_data.config_sema);
@@ -223,21 +224,21 @@ zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
223 case CIO_GONE: 224 case CIO_GONE:
224 ZFCP_LOG_NORMAL("adapter %s: device gone\n", 225 ZFCP_LOG_NORMAL("adapter %s: device gone\n",
225 zfcp_get_busid_by_adapter(adapter)); 226 zfcp_get_busid_by_adapter(adapter));
226 zfcp_erp_adapter_shutdown(adapter, 0, 87, 0); 227 zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL);
227 break; 228 break;
228 case CIO_NO_PATH: 229 case CIO_NO_PATH:
229 ZFCP_LOG_NORMAL("adapter %s: no path\n", 230 ZFCP_LOG_NORMAL("adapter %s: no path\n",
230 zfcp_get_busid_by_adapter(adapter)); 231 zfcp_get_busid_by_adapter(adapter));
231 zfcp_erp_adapter_shutdown(adapter, 0, 88, 0); 232 zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL);
232 break; 233 break;
233 case CIO_OPER: 234 case CIO_OPER:
234 ZFCP_LOG_NORMAL("adapter %s: operational again\n", 235 ZFCP_LOG_NORMAL("adapter %s: operational again\n",
235 zfcp_get_busid_by_adapter(adapter)); 236 zfcp_get_busid_by_adapter(adapter));
236 zfcp_erp_modify_adapter_status(adapter, 11, 0, 237 zfcp_erp_modify_adapter_status(adapter, 11, NULL,
237 ZFCP_STATUS_COMMON_RUNNING, 238 ZFCP_STATUS_COMMON_RUNNING,
238 ZFCP_SET); 239 ZFCP_SET);
239 zfcp_erp_adapter_reopen(adapter, 240 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
240 ZFCP_STATUS_COMMON_ERP_FAILED, 89, 0); 241 89, NULL);
241 break; 242 break;
242 } 243 }
243 zfcp_erp_wait(adapter); 244 zfcp_erp_wait(adapter);
@@ -269,7 +270,7 @@ zfcp_ccw_shutdown(struct ccw_device *cdev)
269 270
270 down(&zfcp_data.config_sema); 271 down(&zfcp_data.config_sema);
271 adapter = dev_get_drvdata(&cdev->dev); 272 adapter = dev_get_drvdata(&cdev->dev);
272 zfcp_erp_adapter_shutdown(adapter, 0, 90, 0); 273 zfcp_erp_adapter_shutdown(adapter, 0, 90, NULL);
273 zfcp_erp_wait(adapter); 274 zfcp_erp_wait(adapter);
274 up(&zfcp_data.config_sema); 275 up(&zfcp_data.config_sema);
275} 276}
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index c34a874482a5..37b85c67b11d 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -700,7 +700,7 @@ void zfcp_rec_dbf_event_thread(u8 id2, struct zfcp_adapter *adapter, int lock)
700 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags); 700 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
701} 701}
702 702
703static void zfcp_rec_dbf_event_target(u8 id2, u64 ref, 703static void zfcp_rec_dbf_event_target(u8 id2, void *ref,
704 struct zfcp_adapter *adapter, 704 struct zfcp_adapter *adapter,
705 atomic_t *status, atomic_t *erp_count, 705 atomic_t *status, atomic_t *erp_count,
706 u64 wwpn, u32 d_id, u64 fcp_lun) 706 u64 wwpn, u32 d_id, u64 fcp_lun)
@@ -712,7 +712,7 @@ static void zfcp_rec_dbf_event_target(u8 id2, u64 ref,
712 memset(r, 0, sizeof(*r)); 712 memset(r, 0, sizeof(*r));
713 r->id = ZFCP_REC_DBF_ID_TARGET; 713 r->id = ZFCP_REC_DBF_ID_TARGET;
714 r->id2 = id2; 714 r->id2 = id2;
715 r->u.target.ref = ref; 715 r->u.target.ref = (unsigned long)ref;
716 r->u.target.status = atomic_read(status); 716 r->u.target.status = atomic_read(status);
717 r->u.target.wwpn = wwpn; 717 r->u.target.wwpn = wwpn;
718 r->u.target.d_id = d_id; 718 r->u.target.d_id = d_id;
@@ -728,7 +728,7 @@ static void zfcp_rec_dbf_event_target(u8 id2, u64 ref,
728 * @ref: additional reference (e.g. request) 728 * @ref: additional reference (e.g. request)
729 * @adapter: adapter 729 * @adapter: adapter
730 */ 730 */
731void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *adapter) 731void zfcp_rec_dbf_event_adapter(u8 id, void *ref, struct zfcp_adapter *adapter)
732{ 732{
733 zfcp_rec_dbf_event_target(id, ref, adapter, &adapter->status, 733 zfcp_rec_dbf_event_target(id, ref, adapter, &adapter->status,
734 &adapter->erp_counter, 0, 0, 0); 734 &adapter->erp_counter, 0, 0, 0);
@@ -740,7 +740,7 @@ void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *adapter)
740 * @ref: additional reference (e.g. request) 740 * @ref: additional reference (e.g. request)
741 * @port: port 741 * @port: port
742 */ 742 */
743void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port) 743void zfcp_rec_dbf_event_port(u8 id, void *ref, struct zfcp_port *port)
744{ 744{
745 struct zfcp_adapter *adapter = port->adapter; 745 struct zfcp_adapter *adapter = port->adapter;
746 746
@@ -755,7 +755,7 @@ void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port)
755 * @ref: additional reference (e.g. request) 755 * @ref: additional reference (e.g. request)
756 * @unit: unit 756 * @unit: unit
757 */ 757 */
758void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit) 758void zfcp_rec_dbf_event_unit(u8 id, void *ref, struct zfcp_unit *unit)
759{ 759{
760 struct zfcp_port *port = unit->port; 760 struct zfcp_port *port = unit->port;
761 struct zfcp_adapter *adapter = port->adapter; 761 struct zfcp_adapter *adapter = port->adapter;
@@ -776,8 +776,8 @@ void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit)
776 * @port: port 776 * @port: port
777 * @unit: unit 777 * @unit: unit
778 */ 778 */
779void zfcp_rec_dbf_event_trigger(u8 id2, u64 ref, u8 want, u8 need, u64 action, 779void zfcp_rec_dbf_event_trigger(u8 id2, void *ref, u8 want, u8 need,
780 struct zfcp_adapter *adapter, 780 void *action, struct zfcp_adapter *adapter,
781 struct zfcp_port *port, struct zfcp_unit *unit) 781 struct zfcp_port *port, struct zfcp_unit *unit)
782{ 782{
783 struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf; 783 struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf;
@@ -787,10 +787,10 @@ void zfcp_rec_dbf_event_trigger(u8 id2, u64 ref, u8 want, u8 need, u64 action,
787 memset(r, 0, sizeof(*r)); 787 memset(r, 0, sizeof(*r));
788 r->id = ZFCP_REC_DBF_ID_TRIGGER; 788 r->id = ZFCP_REC_DBF_ID_TRIGGER;
789 r->id2 = id2; 789 r->id2 = id2;
790 r->u.trigger.ref = ref; 790 r->u.trigger.ref = (unsigned long)ref;
791 r->u.trigger.want = want; 791 r->u.trigger.want = want;
792 r->u.trigger.need = need; 792 r->u.trigger.need = need;
793 r->u.trigger.action = action; 793 r->u.trigger.action = (unsigned long)action;
794 r->u.trigger.as = atomic_read(&adapter->status); 794 r->u.trigger.as = atomic_read(&adapter->status);
795 if (port) { 795 if (port) {
796 r->u.trigger.ps = atomic_read(&port->status); 796 r->u.trigger.ps = atomic_read(&port->status);
@@ -819,10 +819,10 @@ void zfcp_rec_dbf_event_action(u8 id2, struct zfcp_erp_action *erp_action)
819 memset(r, 0, sizeof(*r)); 819 memset(r, 0, sizeof(*r));
820 r->id = ZFCP_REC_DBF_ID_ACTION; 820 r->id = ZFCP_REC_DBF_ID_ACTION;
821 r->id2 = id2; 821 r->id2 = id2;
822 r->u.action.action = (u64)erp_action; 822 r->u.action.action = (unsigned long)erp_action;
823 r->u.action.status = erp_action->status; 823 r->u.action.status = erp_action->status;
824 r->u.action.step = erp_action->step; 824 r->u.action.step = erp_action->step;
825 r->u.action.fsf_req = (u64)erp_action->fsf_req; 825 r->u.action.fsf_req = (unsigned long)erp_action->fsf_req;
826 debug_event(adapter->rec_dbf, 4, r, sizeof(*r)); 826 debug_event(adapter->rec_dbf, 4, r, sizeof(*r));
827 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags); 827 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
828} 828}
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index feb1fda33d25..805484658dd9 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -27,15 +27,16 @@ static int zfcp_erp_adisc(struct zfcp_port *);
27static void zfcp_erp_adisc_handler(unsigned long); 27static void zfcp_erp_adisc_handler(unsigned long);
28 28
29static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int, u8, 29static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int, u8,
30 u64); 30 void *);
31static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *, int, u8, 31static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *, int, u8,
32 u64); 32 void *);
33static int zfcp_erp_port_reopen_internal(struct zfcp_port *, int, u8, u64); 33static int zfcp_erp_port_reopen_internal(struct zfcp_port *, int, u8, void *);
34static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *, int, u8, u64); 34static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *, int, u8, void *);
35 35
36static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *, int, u8, 36static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *, int, u8,
37 u64); 37 void *);
38static int zfcp_erp_unit_reopen_all_internal(struct zfcp_port *, int, u8, u64); 38static int zfcp_erp_unit_reopen_all_internal(struct zfcp_port *, int, u8,
39 void *);
39 40
40static void zfcp_erp_adapter_block(struct zfcp_adapter *, int); 41static void zfcp_erp_adapter_block(struct zfcp_adapter *, int);
41static void zfcp_erp_adapter_unblock(struct zfcp_adapter *); 42static void zfcp_erp_adapter_unblock(struct zfcp_adapter *);
@@ -101,7 +102,7 @@ static void zfcp_erp_action_dismiss(struct zfcp_erp_action *);
101 102
102static int zfcp_erp_action_enqueue(int, struct zfcp_adapter *, 103static int zfcp_erp_action_enqueue(int, struct zfcp_adapter *,
103 struct zfcp_port *, struct zfcp_unit *, 104 struct zfcp_port *, struct zfcp_unit *,
104 u8 id, u64 ref); 105 u8 id, void *ref);
105static int zfcp_erp_action_dequeue(struct zfcp_erp_action *); 106static int zfcp_erp_action_dequeue(struct zfcp_erp_action *);
106static void zfcp_erp_action_cleanup(int, struct zfcp_adapter *, 107static void zfcp_erp_action_cleanup(int, struct zfcp_adapter *,
107 struct zfcp_port *, struct zfcp_unit *, 108 struct zfcp_port *, struct zfcp_unit *,
@@ -165,7 +166,7 @@ static void zfcp_close_fsf(struct zfcp_adapter *adapter)
165 /* reset FSF request sequence number */ 166 /* reset FSF request sequence number */
166 adapter->fsf_req_seq_no = 0; 167 adapter->fsf_req_seq_no = 0;
167 /* all ports and units are closed */ 168 /* all ports and units are closed */
168 zfcp_erp_modify_adapter_status(adapter, 24, 0, 169 zfcp_erp_modify_adapter_status(adapter, 24, NULL,
169 ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); 170 ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR);
170} 171}
171 172
@@ -181,7 +182,8 @@ static void zfcp_close_fsf(struct zfcp_adapter *adapter)
181static void zfcp_fsf_request_timeout_handler(unsigned long data) 182static void zfcp_fsf_request_timeout_handler(unsigned long data)
182{ 183{
183 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; 184 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data;
184 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 62, 0); 185 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 62,
186 NULL);
185} 187}
186 188
187void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, unsigned long timeout) 189void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, unsigned long timeout)
@@ -203,7 +205,7 @@ void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, unsigned long timeout)
203 * <0 - failed to initiate action 205 * <0 - failed to initiate action
204 */ 206 */
205static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter, 207static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter,
206 int clear_mask, u8 id, u64 ref) 208 int clear_mask, u8 id, void *ref)
207{ 209{
208 int retval; 210 int retval;
209 211
@@ -216,7 +218,7 @@ static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter,
216 ZFCP_LOG_DEBUG("skipped reopen of failed adapter %s\n", 218 ZFCP_LOG_DEBUG("skipped reopen of failed adapter %s\n",
217 zfcp_get_busid_by_adapter(adapter)); 219 zfcp_get_busid_by_adapter(adapter));
218 /* ensure propagation of failed status to new devices */ 220 /* ensure propagation of failed status to new devices */
219 zfcp_erp_adapter_failed(adapter, 13, 0); 221 zfcp_erp_adapter_failed(adapter, 13, NULL);
220 retval = -EIO; 222 retval = -EIO;
221 goto out; 223 goto out;
222 } 224 }
@@ -237,7 +239,7 @@ static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter,
237 * <0 - failed to initiate action 239 * <0 - failed to initiate action
238 */ 240 */
239int zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear_mask, 241int zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear_mask,
240 u8 id, u64 ref) 242 u8 id, void *ref)
241{ 243{
242 int retval; 244 int retval;
243 unsigned long flags; 245 unsigned long flags;
@@ -252,7 +254,7 @@ int zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear_mask,
252} 254}
253 255
254int zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear_mask, 256int zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear_mask,
255 u8 id, u64 ref) 257 u8 id, void *ref)
256{ 258{
257 int retval; 259 int retval;
258 260
@@ -265,7 +267,7 @@ int zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear_mask,
265} 267}
266 268
267int zfcp_erp_port_shutdown(struct zfcp_port *port, int clear_mask, u8 id, 269int zfcp_erp_port_shutdown(struct zfcp_port *port, int clear_mask, u8 id,
268 u64 ref) 270 void *ref)
269{ 271{
270 int retval; 272 int retval;
271 273
@@ -278,7 +280,7 @@ int zfcp_erp_port_shutdown(struct zfcp_port *port, int clear_mask, u8 id,
278} 280}
279 281
280int zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear_mask, u8 id, 282int zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear_mask, u8 id,
281 u64 ref) 283 void *ref)
282{ 284{
283 int retval; 285 int retval;
284 286
@@ -399,7 +401,7 @@ zfcp_erp_adisc_handler(unsigned long data)
399 "force physical port reopen " 401 "force physical port reopen "
400 "(adapter %s, port d_id=0x%06x)\n", 402 "(adapter %s, port d_id=0x%06x)\n",
401 zfcp_get_busid_by_adapter(adapter), d_id); 403 zfcp_get_busid_by_adapter(adapter), d_id);
402 if (zfcp_erp_port_forced_reopen(port, 0, 63, 0)) 404 if (zfcp_erp_port_forced_reopen(port, 0, 63, NULL))
403 ZFCP_LOG_NORMAL("failed reopen of port " 405 ZFCP_LOG_NORMAL("failed reopen of port "
404 "(adapter %s, wwpn=0x%016Lx)\n", 406 "(adapter %s, wwpn=0x%016Lx)\n",
405 zfcp_get_busid_by_port(port), 407 zfcp_get_busid_by_port(port),
@@ -426,7 +428,7 @@ zfcp_erp_adisc_handler(unsigned long data)
426 "adisc_resp_wwpn=0x%016Lx)\n", 428 "adisc_resp_wwpn=0x%016Lx)\n",
427 zfcp_get_busid_by_port(port), 429 zfcp_get_busid_by_port(port),
428 port->wwpn, (wwn_t) adisc->wwpn); 430 port->wwpn, (wwn_t) adisc->wwpn);
429 if (zfcp_erp_port_reopen(port, 0, 64, 0)) 431 if (zfcp_erp_port_reopen(port, 0, 64, NULL))
430 ZFCP_LOG_NORMAL("failed reopen of port " 432 ZFCP_LOG_NORMAL("failed reopen of port "
431 "(adapter %s, wwpn=0x%016Lx)\n", 433 "(adapter %s, wwpn=0x%016Lx)\n",
432 zfcp_get_busid_by_port(port), 434 zfcp_get_busid_by_port(port),
@@ -460,7 +462,7 @@ zfcp_test_link(struct zfcp_port *port)
460 ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx " 462 ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx "
461 "on adapter %s\n ", port->wwpn, 463 "on adapter %s\n ", port->wwpn,
462 zfcp_get_busid_by_port(port)); 464 zfcp_get_busid_by_port(port));
463 retval = zfcp_erp_port_forced_reopen(port, 0, 65, 0); 465 retval = zfcp_erp_port_forced_reopen(port, 0, 65, NULL);
464 if (retval != 0) { 466 if (retval != 0) {
465 ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx " 467 ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx "
466 "on adapter %s failed\n", port->wwpn, 468 "on adapter %s failed\n", port->wwpn,
@@ -484,7 +486,8 @@ zfcp_test_link(struct zfcp_port *port)
484 * <0 - failed to initiate action 486 * <0 - failed to initiate action
485 */ 487 */
486static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port, 488static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port,
487 int clear_mask, u8 id, u64 ref) 489 int clear_mask, u8 id,
490 void *ref)
488{ 491{
489 int retval; 492 int retval;
490 493
@@ -518,7 +521,7 @@ static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port,
518 * <0 - failed to initiate action 521 * <0 - failed to initiate action
519 */ 522 */
520int zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear_mask, u8 id, 523int zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear_mask, u8 id,
521 u64 ref) 524 void *ref)
522{ 525{
523 int retval; 526 int retval;
524 unsigned long flags; 527 unsigned long flags;
@@ -546,7 +549,7 @@ int zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear_mask, u8 id,
546 * <0 - failed to initiate action 549 * <0 - failed to initiate action
547 */ 550 */
548static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask, 551static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask,
549 u8 id, u64 ref) 552 u8 id, void *ref)
550{ 553{
551 int retval; 554 int retval;
552 555
@@ -560,7 +563,7 @@ static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask,
560 "on adapter %s\n", port->wwpn, 563 "on adapter %s\n", port->wwpn,
561 zfcp_get_busid_by_port(port)); 564 zfcp_get_busid_by_port(port));
562 /* ensure propagation of failed status to new devices */ 565 /* ensure propagation of failed status to new devices */
563 zfcp_erp_port_failed(port, 14, 0); 566 zfcp_erp_port_failed(port, 14, NULL);
564 retval = -EIO; 567 retval = -EIO;
565 goto out; 568 goto out;
566 } 569 }
@@ -582,7 +585,8 @@ static int zfcp_erp_port_reopen_internal(struct zfcp_port *port, int clear_mask,
582 * correct locking. An error recovery task is initiated to do the reopen. 585 * correct locking. An error recovery task is initiated to do the reopen.
583 * To wait for the completion of the reopen zfcp_erp_wait should be used. 586 * To wait for the completion of the reopen zfcp_erp_wait should be used.
584 */ 587 */
585int zfcp_erp_port_reopen(struct zfcp_port *port, int clear_mask, u8 id, u64 ref) 588int zfcp_erp_port_reopen(struct zfcp_port *port, int clear_mask, u8 id,
589 void *ref)
586{ 590{
587 int retval; 591 int retval;
588 unsigned long flags; 592 unsigned long flags;
@@ -608,7 +612,7 @@ int zfcp_erp_port_reopen(struct zfcp_port *port, int clear_mask, u8 id, u64 ref)
608 * <0 - failed to initiate action 612 * <0 - failed to initiate action
609 */ 613 */
610static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *unit, int clear_mask, 614static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *unit, int clear_mask,
611 u8 id, u64 ref) 615 u8 id, void *ref)
612{ 616{
613 int retval; 617 int retval;
614 struct zfcp_adapter *adapter = unit->port->adapter; 618 struct zfcp_adapter *adapter = unit->port->adapter;
@@ -644,7 +648,8 @@ static int zfcp_erp_unit_reopen_internal(struct zfcp_unit *unit, int clear_mask,
644 * locking. An error recovery task is initiated to do the reopen. 648 * locking. An error recovery task is initiated to do the reopen.
645 * To wait for the completion of the reopen zfcp_erp_wait should be used. 649 * To wait for the completion of the reopen zfcp_erp_wait should be used.
646 */ 650 */
647int zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask, u8 id, u64 ref) 651int zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask, u8 id,
652 void *ref)
648{ 653{
649 int retval; 654 int retval;
650 unsigned long flags; 655 unsigned long flags;
@@ -668,7 +673,7 @@ int zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask, u8 id, u64 ref)
668 */ 673 */
669static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask) 674static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask)
670{ 675{
671 zfcp_erp_modify_adapter_status(adapter, 15, 0, 676 zfcp_erp_modify_adapter_status(adapter, 15, NULL,
672 ZFCP_STATUS_COMMON_UNBLOCKED | 677 ZFCP_STATUS_COMMON_UNBLOCKED |
673 clear_mask, ZFCP_CLEAR); 678 clear_mask, ZFCP_CLEAR);
674} 679}
@@ -704,7 +709,7 @@ static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
704{ 709{
705 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 710 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
706 &adapter->status)) 711 &adapter->status))
707 zfcp_rec_dbf_event_adapter(16, 0, adapter); 712 zfcp_rec_dbf_event_adapter(16, NULL, adapter);
708} 713}
709 714
710/* 715/*
@@ -719,7 +724,7 @@ static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
719static void 724static void
720zfcp_erp_port_block(struct zfcp_port *port, int clear_mask) 725zfcp_erp_port_block(struct zfcp_port *port, int clear_mask)
721{ 726{
722 zfcp_erp_modify_port_status(port, 17, 0, 727 zfcp_erp_modify_port_status(port, 17, NULL,
723 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, 728 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask,
724 ZFCP_CLEAR); 729 ZFCP_CLEAR);
725} 730}
@@ -736,7 +741,7 @@ zfcp_erp_port_unblock(struct zfcp_port *port)
736{ 741{
737 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 742 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
738 &port->status)) 743 &port->status))
739 zfcp_rec_dbf_event_port(18, 0, port); 744 zfcp_rec_dbf_event_port(18, NULL, port);
740} 745}
741 746
742/* 747/*
@@ -751,7 +756,7 @@ zfcp_erp_port_unblock(struct zfcp_port *port)
751static void 756static void
752zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask) 757zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask)
753{ 758{
754 zfcp_erp_modify_unit_status(unit, 19, 0, 759 zfcp_erp_modify_unit_status(unit, 19, NULL,
755 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, 760 ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask,
756 ZFCP_CLEAR); 761 ZFCP_CLEAR);
757} 762}
@@ -768,7 +773,7 @@ zfcp_erp_unit_unblock(struct zfcp_unit *unit)
768{ 773{
769 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, 774 if (atomic_test_and_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED,
770 &unit->status)) 775 &unit->status))
771 zfcp_rec_dbf_event_unit(20, 0, unit); 776 zfcp_rec_dbf_event_unit(20, NULL, unit);
772} 777}
773 778
774static void 779static void
@@ -1140,7 +1145,7 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1140 "restarting I/O on adapter %s " 1145 "restarting I/O on adapter %s "
1141 "to free mempool\n", 1146 "to free mempool\n",
1142 zfcp_get_busid_by_adapter(adapter)); 1147 zfcp_get_busid_by_adapter(adapter));
1143 zfcp_erp_adapter_reopen_internal(adapter, 0, 66, 0); 1148 zfcp_erp_adapter_reopen_internal(adapter, 0, 66, NULL);
1144 } else { 1149 } else {
1145 retval = zfcp_erp_strategy_memwait(erp_action); 1150 retval = zfcp_erp_strategy_memwait(erp_action);
1146 } 1151 }
@@ -1295,7 +1300,7 @@ zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action)
1295 * 1300 *
1296 */ 1301 */
1297void 1302void
1298zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, u64 ref) 1303zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, void *ref)
1299{ 1304{
1300 zfcp_erp_modify_adapter_status(adapter, id, ref, 1305 zfcp_erp_modify_adapter_status(adapter, id, ref,
1301 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); 1306 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -1310,7 +1315,7 @@ zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, u64 ref)
1310 * 1315 *
1311 */ 1316 */
1312void 1317void
1313zfcp_erp_port_failed(struct zfcp_port *port, u8 id, u64 ref) 1318zfcp_erp_port_failed(struct zfcp_port *port, u8 id, void *ref)
1314{ 1319{
1315 zfcp_erp_modify_port_status(port, id, ref, 1320 zfcp_erp_modify_port_status(port, id, ref,
1316 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); 1321 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -1331,7 +1336,7 @@ zfcp_erp_port_failed(struct zfcp_port *port, u8 id, u64 ref)
1331 * 1336 *
1332 */ 1337 */
1333void 1338void
1334zfcp_erp_unit_failed(struct zfcp_unit *unit, u8 id, u64 ref) 1339zfcp_erp_unit_failed(struct zfcp_unit *unit, u8 id, void *ref)
1335{ 1340{
1336 zfcp_erp_modify_unit_status(unit, id, ref, 1341 zfcp_erp_modify_unit_status(unit, id, ref,
1337 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); 1342 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -1395,7 +1400,7 @@ zfcp_erp_strategy_statechange(int action,
1395 status)) { 1400 status)) {
1396 zfcp_erp_adapter_reopen_internal(adapter, 1401 zfcp_erp_adapter_reopen_internal(adapter,
1397 ZFCP_STATUS_COMMON_ERP_FAILED, 1402 ZFCP_STATUS_COMMON_ERP_FAILED,
1398 67, 0); 1403 67, NULL);
1399 retval = ZFCP_ERP_EXIT; 1404 retval = ZFCP_ERP_EXIT;
1400 } 1405 }
1401 break; 1406 break;
@@ -1406,7 +1411,7 @@ zfcp_erp_strategy_statechange(int action,
1406 status)) { 1411 status)) {
1407 zfcp_erp_port_reopen_internal(port, 1412 zfcp_erp_port_reopen_internal(port,
1408 ZFCP_STATUS_COMMON_ERP_FAILED, 1413 ZFCP_STATUS_COMMON_ERP_FAILED,
1409 68, 0); 1414 68, NULL);
1410 retval = ZFCP_ERP_EXIT; 1415 retval = ZFCP_ERP_EXIT;
1411 } 1416 }
1412 break; 1417 break;
@@ -1416,7 +1421,7 @@ zfcp_erp_strategy_statechange(int action,
1416 status)) { 1421 status)) {
1417 zfcp_erp_unit_reopen_internal(unit, 1422 zfcp_erp_unit_reopen_internal(unit,
1418 ZFCP_STATUS_COMMON_ERP_FAILED, 1423 ZFCP_STATUS_COMMON_ERP_FAILED,
1419 69, 0); 1424 69, NULL);
1420 retval = ZFCP_ERP_EXIT; 1425 retval = ZFCP_ERP_EXIT;
1421 } 1426 }
1422 break; 1427 break;
@@ -1448,7 +1453,7 @@ zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result)
1448 case ZFCP_ERP_FAILED : 1453 case ZFCP_ERP_FAILED :
1449 atomic_inc(&unit->erp_counter); 1454 atomic_inc(&unit->erp_counter);
1450 if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS) 1455 if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS)
1451 zfcp_erp_unit_failed(unit, 21, 0); 1456 zfcp_erp_unit_failed(unit, 21, NULL);
1452 break; 1457 break;
1453 case ZFCP_ERP_EXIT : 1458 case ZFCP_ERP_EXIT :
1454 /* nothing */ 1459 /* nothing */
@@ -1474,7 +1479,7 @@ zfcp_erp_strategy_check_port(struct zfcp_port *port, int result)
1474 case ZFCP_ERP_FAILED : 1479 case ZFCP_ERP_FAILED :
1475 atomic_inc(&port->erp_counter); 1480 atomic_inc(&port->erp_counter);
1476 if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS) 1481 if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS)
1477 zfcp_erp_port_failed(port, 22, 0); 1482 zfcp_erp_port_failed(port, 22, NULL);
1478 break; 1483 break;
1479 case ZFCP_ERP_EXIT : 1484 case ZFCP_ERP_EXIT :
1480 /* nothing */ 1485 /* nothing */
@@ -1500,7 +1505,7 @@ zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter, int result)
1500 case ZFCP_ERP_FAILED : 1505 case ZFCP_ERP_FAILED :
1501 atomic_inc(&adapter->erp_counter); 1506 atomic_inc(&adapter->erp_counter);
1502 if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS) 1507 if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS)
1503 zfcp_erp_adapter_failed(adapter, 23, 0); 1508 zfcp_erp_adapter_failed(adapter, 23, NULL);
1504 break; 1509 break;
1505 case ZFCP_ERP_EXIT : 1510 case ZFCP_ERP_EXIT :
1506 /* nothing */ 1511 /* nothing */
@@ -1588,29 +1593,29 @@ zfcp_erp_strategy_followup_actions(int action,
1588 1593
1589 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 1594 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
1590 if (status == ZFCP_ERP_SUCCEEDED) 1595 if (status == ZFCP_ERP_SUCCEEDED)
1591 zfcp_erp_port_reopen_all_internal(adapter, 0, 70, 0); 1596 zfcp_erp_port_reopen_all_internal(adapter, 0, 70, NULL);
1592 else 1597 else
1593 zfcp_erp_adapter_reopen_internal(adapter, 0, 71, 0); 1598 zfcp_erp_adapter_reopen_internal(adapter, 0, 71, NULL);
1594 break; 1599 break;
1595 1600
1596 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: 1601 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
1597 if (status == ZFCP_ERP_SUCCEEDED) 1602 if (status == ZFCP_ERP_SUCCEEDED)
1598 zfcp_erp_port_reopen_internal(port, 0, 72, 0); 1603 zfcp_erp_port_reopen_internal(port, 0, 72, NULL);
1599 else 1604 else
1600 zfcp_erp_adapter_reopen_internal(adapter, 0, 73, 0); 1605 zfcp_erp_adapter_reopen_internal(adapter, 0, 73, NULL);
1601 break; 1606 break;
1602 1607
1603 case ZFCP_ERP_ACTION_REOPEN_PORT: 1608 case ZFCP_ERP_ACTION_REOPEN_PORT:
1604 if (status == ZFCP_ERP_SUCCEEDED) 1609 if (status == ZFCP_ERP_SUCCEEDED)
1605 zfcp_erp_unit_reopen_all_internal(port, 0, 74, 0); 1610 zfcp_erp_unit_reopen_all_internal(port, 0, 74, NULL);
1606 else 1611 else
1607 zfcp_erp_port_forced_reopen_internal(port, 0, 75, 0); 1612 zfcp_erp_port_forced_reopen_internal(port, 0, 75, NULL);
1608 break; 1613 break;
1609 1614
1610 case ZFCP_ERP_ACTION_REOPEN_UNIT: 1615 case ZFCP_ERP_ACTION_REOPEN_UNIT:
1611 /* Nothing to do if status == ZFCP_ERP_SUCCEEDED */ 1616 /* Nothing to do if status == ZFCP_ERP_SUCCEEDED */
1612 if (status != ZFCP_ERP_SUCCEEDED) 1617 if (status != ZFCP_ERP_SUCCEEDED)
1613 zfcp_erp_port_reopen_internal(unit->port, 0, 76, 0); 1618 zfcp_erp_port_reopen_internal(unit->port, 0, 76, NULL);
1614 break; 1619 break;
1615 } 1620 }
1616 1621
@@ -1654,7 +1659,7 @@ zfcp_erp_wait(struct zfcp_adapter *adapter)
1654} 1659}
1655 1660
1656void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id, 1661void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id,
1657 u64 ref, u32 mask, int set_or_clear) 1662 void *ref, u32 mask, int set_or_clear)
1658{ 1663{
1659 struct zfcp_port *port; 1664 struct zfcp_port *port;
1660 u32 changed, common_mask = mask & ZFCP_COMMON_FLAGS; 1665 u32 changed, common_mask = mask & ZFCP_COMMON_FLAGS;
@@ -1682,7 +1687,7 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id,
1682 * purpose: sets the port and all underlying devices to ERP_FAILED 1687 * purpose: sets the port and all underlying devices to ERP_FAILED
1683 * 1688 *
1684 */ 1689 */
1685void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, u64 ref, 1690void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, void *ref,
1686 u32 mask, int set_or_clear) 1691 u32 mask, int set_or_clear)
1687{ 1692{
1688 struct zfcp_unit *unit; 1693 struct zfcp_unit *unit;
@@ -1711,7 +1716,7 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, u64 ref,
1711 * purpose: sets the unit to ERP_FAILED 1716 * purpose: sets the unit to ERP_FAILED
1712 * 1717 *
1713 */ 1718 */
1714void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, u64 ref, 1719void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, void *ref,
1715 u32 mask, int set_or_clear) 1720 u32 mask, int set_or_clear)
1716{ 1721{
1717 u32 changed; 1722 u32 changed;
@@ -1738,7 +1743,7 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, u64 ref,
1738 * <0 - failed to initiate action 1743 * <0 - failed to initiate action
1739 */ 1744 */
1740int zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, int clear_mask, 1745int zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, int clear_mask,
1741 u8 id, u64 ref) 1746 u8 id, void *ref)
1742{ 1747{
1743 int retval; 1748 int retval;
1744 unsigned long flags; 1749 unsigned long flags;
@@ -1754,7 +1759,7 @@ int zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, int clear_mask,
1754} 1759}
1755 1760
1756static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *adapter, 1761static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *adapter,
1757 int clear_mask, u8 id, u64 ref) 1762 int clear_mask, u8 id, void *ref)
1758{ 1763{
1759 int retval = 0; 1764 int retval = 0;
1760 struct zfcp_port *port; 1765 struct zfcp_port *port;
@@ -1775,7 +1780,7 @@ static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *adapter,
1775 * returns: FIXME 1780 * returns: FIXME
1776 */ 1781 */
1777static int zfcp_erp_unit_reopen_all_internal(struct zfcp_port *port, 1782static int zfcp_erp_unit_reopen_all_internal(struct zfcp_port *port,
1778 int clear_mask, u8 id, u64 ref) 1783 int clear_mask, u8 id, void *ref)
1779{ 1784{
1780 int retval = 0; 1785 int retval = 0;
1781 struct zfcp_unit *unit; 1786 struct zfcp_unit *unit;
@@ -2291,7 +2296,7 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action)
2291 port->wwpn, 2296 port->wwpn,
2292 zfcp_get_busid_by_adapter(adapter), 2297 zfcp_get_busid_by_adapter(adapter),
2293 adapter->peer_wwpn); 2298 adapter->peer_wwpn);
2294 zfcp_erp_port_failed(port, 25, 0); 2299 zfcp_erp_port_failed(port, 25, NULL);
2295 retval = ZFCP_ERP_FAILED; 2300 retval = ZFCP_ERP_FAILED;
2296 break; 2301 break;
2297 } 2302 }
@@ -2318,7 +2323,7 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action)
2318 atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, 2323 atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING,
2319 &adapter->nameserver_port->status); 2324 &adapter->nameserver_port->status);
2320 if (zfcp_erp_port_reopen(adapter->nameserver_port, 0, 2325 if (zfcp_erp_port_reopen(adapter->nameserver_port, 0,
2321 77, (u64)erp_action) >= 0) { 2326 77, erp_action) >= 0) {
2322 erp_action->step = 2327 erp_action->step =
2323 ZFCP_ERP_STEP_NAMESERVER_OPEN; 2328 ZFCP_ERP_STEP_NAMESERVER_OPEN;
2324 retval = ZFCP_ERP_CONTINUES; 2329 retval = ZFCP_ERP_CONTINUES;
@@ -2349,7 +2354,7 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action)
2349 "for port 0x%016Lx " 2354 "for port 0x%016Lx "
2350 "(misconfigured WWPN?)\n", 2355 "(misconfigured WWPN?)\n",
2351 port->wwpn); 2356 port->wwpn);
2352 zfcp_erp_port_failed(port, 26, 0); 2357 zfcp_erp_port_failed(port, 26, NULL);
2353 retval = ZFCP_ERP_EXIT; 2358 retval = ZFCP_ERP_EXIT;
2354 } else { 2359 } else {
2355 ZFCP_LOG_DEBUG("nameserver look-up failed for " 2360 ZFCP_LOG_DEBUG("nameserver look-up failed for "
@@ -2449,7 +2454,8 @@ zfcp_erp_port_strategy_open_nameserver_wakeup(struct zfcp_erp_action
2449 if (atomic_test_mask( 2454 if (atomic_test_mask(
2450 ZFCP_STATUS_COMMON_ERP_FAILED, 2455 ZFCP_STATUS_COMMON_ERP_FAILED,
2451 &adapter->nameserver_port->status)) 2456 &adapter->nameserver_port->status))
2452 zfcp_erp_port_failed(erp_action->port, 27, 0); 2457 zfcp_erp_port_failed(erp_action->port, 27,
2458 NULL);
2453 zfcp_erp_action_ready(erp_action); 2459 zfcp_erp_action_ready(erp_action);
2454 } 2460 }
2455 } 2461 }
@@ -2745,7 +2751,7 @@ void zfcp_erp_start_timer(struct zfcp_fsf_req *fsf_req)
2745 */ 2751 */
2746static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, 2752static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
2747 struct zfcp_port *port, 2753 struct zfcp_port *port,
2748 struct zfcp_unit *unit, u8 id, u64 ref) 2754 struct zfcp_unit *unit, u8 id, void *ref)
2749{ 2755{
2750 int retval = 1, need = want; 2756 int retval = 1, need = want;
2751 struct zfcp_erp_action *erp_action = NULL; 2757 struct zfcp_erp_action *erp_action = NULL;
@@ -2888,7 +2894,7 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
2888 zfcp_rec_dbf_event_thread(1, adapter, 0); 2894 zfcp_rec_dbf_event_thread(1, adapter, 0);
2889 retval = 0; 2895 retval = 0;
2890 out: 2896 out:
2891 zfcp_rec_dbf_event_trigger(id, ref, want, need, (u64)erp_action, 2897 zfcp_rec_dbf_event_trigger(id, ref, want, need, erp_action,
2892 adapter, port, unit); 2898 adapter, port, unit);
2893 return retval; 2899 return retval;
2894} 2900}
@@ -3048,7 +3054,7 @@ static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action)
3048 zfcp_rec_dbf_event_action(146, erp_action); 3054 zfcp_rec_dbf_event_action(146, erp_action);
3049} 3055}
3050 3056
3051void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref) 3057void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, void *ref)
3052{ 3058{
3053 unsigned long flags; 3059 unsigned long flags;
3054 3060
@@ -3059,14 +3065,14 @@ void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref)
3059 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref); 3065 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref);
3060} 3066}
3061 3067
3062void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, u64 ref) 3068void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, void *ref)
3063{ 3069{
3064 zfcp_erp_modify_unit_status(unit, id, ref, 3070 zfcp_erp_modify_unit_status(unit, id, ref,
3065 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET); 3071 ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET);
3066 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref); 3072 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref);
3067} 3073}
3068 3074
3069void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, u64 ref) 3075void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, void *ref)
3070{ 3076{
3071 unsigned long flags; 3077 unsigned long flags;
3072 3078
@@ -3077,7 +3083,7 @@ void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, u64 ref)
3077 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 3083 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
3078} 3084}
3079 3085
3080void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, u64 ref) 3086void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, void *ref)
3081{ 3087{
3082 zfcp_erp_modify_unit_status(unit, id, ref, 3088 zfcp_erp_modify_unit_status(unit, id, ref,
3083 ZFCP_STATUS_COMMON_ERP_FAILED | 3089 ZFCP_STATUS_COMMON_ERP_FAILED |
@@ -3085,7 +3091,7 @@ void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, u64 ref)
3085} 3091}
3086 3092
3087void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, u8 id, 3093void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, u8 id,
3088 u64 ref) 3094 void *ref)
3089{ 3095{
3090 struct zfcp_port *port; 3096 struct zfcp_port *port;
3091 unsigned long flags; 3097 unsigned long flags;
@@ -3102,7 +3108,7 @@ void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, u8 id,
3102 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 3108 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
3103} 3109}
3104 3110
3105void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, u64 ref) 3111void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, void *ref)
3106{ 3112{
3107 struct zfcp_adapter *adapter = port->adapter; 3113 struct zfcp_adapter *adapter = port->adapter;
3108 struct zfcp_unit *unit; 3114 struct zfcp_unit *unit;
@@ -3126,7 +3132,7 @@ void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, u64 ref)
3126 zfcp_get_busid_by_adapter(adapter), port->wwpn); 3132 zfcp_get_busid_by_adapter(adapter), port->wwpn);
3127} 3133}
3128 3134
3129void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, u8 id, u64 ref) 3135void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, u8 id, void *ref)
3130{ 3136{
3131 struct zfcp_adapter *adapter = unit->port->adapter; 3137 struct zfcp_adapter *adapter = unit->port->adapter;
3132 3138
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index 6de0147d84d8..6abf178fda5d 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -131,23 +131,25 @@ extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, int);
131extern struct fc_function_template zfcp_transport_functions; 131extern struct fc_function_template zfcp_transport_functions;
132 132
133/******************************** ERP ****************************************/ 133/******************************** ERP ****************************************/
134extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u8, u64, u32, 134extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u8, void *,
135 int); 135 u32, int);
136extern int zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, u8, u64); 136extern int zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, u8, void *);
137extern int zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, u8, u64); 137extern int zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, u8, void *);
138extern void zfcp_erp_adapter_failed(struct zfcp_adapter *, u8, u64); 138extern void zfcp_erp_adapter_failed(struct zfcp_adapter *, u8, void *);
139 139
140extern void zfcp_erp_modify_port_status(struct zfcp_port *, u8, u64, u32, int); 140extern void zfcp_erp_modify_port_status(struct zfcp_port *, u8, void *, u32,
141extern int zfcp_erp_port_reopen(struct zfcp_port *, int, u8, u64); 141 int);
142extern int zfcp_erp_port_shutdown(struct zfcp_port *, int, u8, u64); 142extern int zfcp_erp_port_reopen(struct zfcp_port *, int, u8, void *);
143extern int zfcp_erp_port_forced_reopen(struct zfcp_port *, int, u8, u64); 143extern int zfcp_erp_port_shutdown(struct zfcp_port *, int, u8, void *);
144extern void zfcp_erp_port_failed(struct zfcp_port *, u8, u64); 144extern int zfcp_erp_port_forced_reopen(struct zfcp_port *, int, u8, void *);
145extern int zfcp_erp_port_reopen_all(struct zfcp_adapter *, int, u8, u64); 145extern void zfcp_erp_port_failed(struct zfcp_port *, u8, void *);
146 146extern int zfcp_erp_port_reopen_all(struct zfcp_adapter *, int, u8, void *);
147extern void zfcp_erp_modify_unit_status(struct zfcp_unit *, u8, u64, u32, int); 147
148extern int zfcp_erp_unit_reopen(struct zfcp_unit *, int, u8, u64); 148extern void zfcp_erp_modify_unit_status(struct zfcp_unit *, u8, void *, u32,
149extern int zfcp_erp_unit_shutdown(struct zfcp_unit *, int, u8, u64); 149 int);
150extern void zfcp_erp_unit_failed(struct zfcp_unit *, u8, u64); 150extern int zfcp_erp_unit_reopen(struct zfcp_unit *, int, u8, void *);
151extern int zfcp_erp_unit_shutdown(struct zfcp_unit *, int, u8, void *);
152extern void zfcp_erp_unit_failed(struct zfcp_unit *, u8, void *);
151 153
152extern int zfcp_erp_thread_setup(struct zfcp_adapter *); 154extern int zfcp_erp_thread_setup(struct zfcp_adapter *);
153extern int zfcp_erp_thread_kill(struct zfcp_adapter *); 155extern int zfcp_erp_thread_kill(struct zfcp_adapter *);
@@ -156,22 +158,22 @@ extern void zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long);
156 158
157extern int zfcp_test_link(struct zfcp_port *); 159extern int zfcp_test_link(struct zfcp_port *);
158 160
159extern void zfcp_erp_port_boxed(struct zfcp_port *, u8 id, u64 ref); 161extern void zfcp_erp_port_boxed(struct zfcp_port *, u8 id, void *ref);
160extern void zfcp_erp_unit_boxed(struct zfcp_unit *, u8 id, u64 ref); 162extern void zfcp_erp_unit_boxed(struct zfcp_unit *, u8 id, void *ref);
161extern void zfcp_erp_port_access_denied(struct zfcp_port *, u8 id, u64 ref); 163extern void zfcp_erp_port_access_denied(struct zfcp_port *, u8 id, void *ref);
162extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8 id, u64 ref); 164extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8 id, void *ref);
163extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, u64); 165extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, void *);
164extern void zfcp_erp_port_access_changed(struct zfcp_port *, u8, u64); 166extern void zfcp_erp_port_access_changed(struct zfcp_port *, u8, void *);
165extern void zfcp_erp_unit_access_changed(struct zfcp_unit *, u8, u64); 167extern void zfcp_erp_unit_access_changed(struct zfcp_unit *, u8, void *);
166 168
167/******************************** AUX ****************************************/ 169/******************************** AUX ****************************************/
168extern void zfcp_rec_dbf_event_thread(u8 id, struct zfcp_adapter *adapter, 170extern void zfcp_rec_dbf_event_thread(u8 id, struct zfcp_adapter *adapter,
169 int lock); 171 int lock);
170extern void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *); 172extern void zfcp_rec_dbf_event_adapter(u8 id, void *ref, struct zfcp_adapter *);
171extern void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port); 173extern void zfcp_rec_dbf_event_port(u8 id, void *ref, struct zfcp_port *port);
172extern void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit); 174extern void zfcp_rec_dbf_event_unit(u8 id, void *ref, struct zfcp_unit *unit);
173extern void zfcp_rec_dbf_event_trigger(u8 id, u64 ref, u8 want, u8 need, 175extern void zfcp_rec_dbf_event_trigger(u8 id, void *ref, u8 want, u8 need,
174 u64 action, struct zfcp_adapter *, 176 void *action, struct zfcp_adapter *,
175 struct zfcp_port *, struct zfcp_unit *); 177 struct zfcp_port *, struct zfcp_unit *);
176extern void zfcp_rec_dbf_event_action(u8 id, struct zfcp_erp_action *); 178extern void zfcp_rec_dbf_event_action(u8 id, struct zfcp_erp_action *);
177 179
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index b7aa9696ba60..3211dcc59543 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -298,7 +298,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
298 zfcp_get_busid_by_adapter(adapter), 298 zfcp_get_busid_by_adapter(adapter),
299 prot_status_qual->version_error.fsf_version, 299 prot_status_qual->version_error.fsf_version,
300 ZFCP_QTCB_VERSION); 300 ZFCP_QTCB_VERSION);
301 zfcp_erp_adapter_shutdown(adapter, 0, 117, (u64)fsf_req); 301 zfcp_erp_adapter_shutdown(adapter, 0, 117, fsf_req);
302 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 302 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
303 break; 303 break;
304 304
@@ -309,7 +309,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
309 qtcb->prefix.req_seq_no, 309 qtcb->prefix.req_seq_no,
310 zfcp_get_busid_by_adapter(adapter), 310 zfcp_get_busid_by_adapter(adapter),
311 prot_status_qual->sequence_error.exp_req_seq_no); 311 prot_status_qual->sequence_error.exp_req_seq_no);
312 zfcp_erp_adapter_reopen(adapter, 0, 98, (u64)fsf_req); 312 zfcp_erp_adapter_reopen(adapter, 0, 98, fsf_req);
313 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; 313 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY;
314 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 314 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
315 break; 315 break;
@@ -320,7 +320,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
320 "that used on adapter %s. " 320 "that used on adapter %s. "
321 "Stopping all operations on this adapter.\n", 321 "Stopping all operations on this adapter.\n",
322 zfcp_get_busid_by_adapter(adapter)); 322 zfcp_get_busid_by_adapter(adapter));
323 zfcp_erp_adapter_shutdown(adapter, 0, 118, (u64)fsf_req); 323 zfcp_erp_adapter_shutdown(adapter, 0, 118, fsf_req);
324 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 324 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
325 break; 325 break;
326 326
@@ -337,7 +337,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
337 *(unsigned long long*) 337 *(unsigned long long*)
338 (&qtcb->bottom.support.req_handle), 338 (&qtcb->bottom.support.req_handle),
339 zfcp_get_busid_by_adapter(adapter)); 339 zfcp_get_busid_by_adapter(adapter));
340 zfcp_erp_adapter_shutdown(adapter, 0, 78, (u64)fsf_req); 340 zfcp_erp_adapter_shutdown(adapter, 0, 78, fsf_req);
341 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 341 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
342 break; 342 break;
343 343
@@ -345,7 +345,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
345 zfcp_fsf_link_down_info_eval(fsf_req, 37, 345 zfcp_fsf_link_down_info_eval(fsf_req, 37,
346 &prot_status_qual->link_down_info); 346 &prot_status_qual->link_down_info);
347 /* FIXME: reopening adapter now? better wait for link up */ 347 /* FIXME: reopening adapter now? better wait for link up */
348 zfcp_erp_adapter_reopen(adapter, 0, 79, (u64)fsf_req); 348 zfcp_erp_adapter_reopen(adapter, 0, 79, fsf_req);
349 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 349 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
350 break; 350 break;
351 351
@@ -355,13 +355,13 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
355 "Re-starting operations on this adapter.\n", 355 "Re-starting operations on this adapter.\n",
356 zfcp_get_busid_by_adapter(adapter)); 356 zfcp_get_busid_by_adapter(adapter));
357 /* All ports should be marked as ready to run again */ 357 /* All ports should be marked as ready to run again */
358 zfcp_erp_modify_adapter_status(adapter, 28, 358 zfcp_erp_modify_adapter_status(adapter, 28, NULL,
359 0, ZFCP_STATUS_COMMON_RUNNING, 359 ZFCP_STATUS_COMMON_RUNNING,
360 ZFCP_SET); 360 ZFCP_SET);
361 zfcp_erp_adapter_reopen(adapter, 361 zfcp_erp_adapter_reopen(adapter,
362 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 362 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED
363 | ZFCP_STATUS_COMMON_ERP_FAILED, 363 | ZFCP_STATUS_COMMON_ERP_FAILED,
364 99, (u64)fsf_req); 364 99, fsf_req);
365 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 365 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
366 break; 366 break;
367 367
@@ -371,7 +371,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
371 "Restarting all operations on this " 371 "Restarting all operations on this "
372 "adapter.\n", 372 "adapter.\n",
373 zfcp_get_busid_by_adapter(adapter)); 373 zfcp_get_busid_by_adapter(adapter));
374 zfcp_erp_adapter_reopen(adapter, 0, 100, (u64)fsf_req); 374 zfcp_erp_adapter_reopen(adapter, 0, 100, fsf_req);
375 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; 375 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY;
376 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 376 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
377 break; 377 break;
@@ -384,7 +384,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
384 "(debug info 0x%x).\n", 384 "(debug info 0x%x).\n",
385 zfcp_get_busid_by_adapter(adapter), 385 zfcp_get_busid_by_adapter(adapter),
386 qtcb->prefix.prot_status); 386 qtcb->prefix.prot_status);
387 zfcp_erp_adapter_shutdown(adapter, 0, 119, (u64)fsf_req); 387 zfcp_erp_adapter_shutdown(adapter, 0, 119, fsf_req);
388 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 388 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
389 } 389 }
390 390
@@ -423,8 +423,7 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req)
423 "(debug info 0x%x).\n", 423 "(debug info 0x%x).\n",
424 zfcp_get_busid_by_adapter(fsf_req->adapter), 424 zfcp_get_busid_by_adapter(fsf_req->adapter),
425 fsf_req->qtcb->header.fsf_command); 425 fsf_req->qtcb->header.fsf_command);
426 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 120, 426 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 120, fsf_req);
427 (u64)fsf_req);
428 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 427 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
429 break; 428 break;
430 429
@@ -478,8 +477,7 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
478 "problem on the adapter %s " 477 "problem on the adapter %s "
479 "Stopping all operations on this adapter. ", 478 "Stopping all operations on this adapter. ",
480 zfcp_get_busid_by_adapter(fsf_req->adapter)); 479 zfcp_get_busid_by_adapter(fsf_req->adapter));
481 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 121, 480 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 121, fsf_req);
482 (u64)fsf_req);
483 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 481 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
484 break; 482 break;
485 case FSF_SQ_ULP_PROGRAMMING_ERROR: 483 case FSF_SQ_ULP_PROGRAMMING_ERROR:
@@ -605,7 +603,7 @@ zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *fsf_req, u8 id,
605 link_down->vendor_specific_code); 603 link_down->vendor_specific_code);
606 604
607 out: 605 out:
608 zfcp_erp_adapter_failed(adapter, id, (u64)fsf_req); 606 zfcp_erp_adapter_failed(adapter, id, fsf_req);
609} 607}
610 608
611/* 609/*
@@ -799,11 +797,11 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
799 switch (status_buffer->status_subtype) { 797 switch (status_buffer->status_subtype) {
800 798
801 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: 799 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT:
802 zfcp_erp_port_reopen(port, 0, 101, (u64)fsf_req); 800 zfcp_erp_port_reopen(port, 0, 101, fsf_req);
803 break; 801 break;
804 802
805 case FSF_STATUS_READ_SUB_ERROR_PORT: 803 case FSF_STATUS_READ_SUB_ERROR_PORT:
806 zfcp_erp_port_shutdown(port, 0, 122, (u64)fsf_req); 804 zfcp_erp_port_shutdown(port, 0, 122, fsf_req);
807 break; 805 break;
808 806
809 default: 807 default:
@@ -929,13 +927,13 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
929 "Restarting operations on this adapter\n", 927 "Restarting operations on this adapter\n",
930 zfcp_get_busid_by_adapter(adapter)); 928 zfcp_get_busid_by_adapter(adapter));
931 /* All ports should be marked as ready to run again */ 929 /* All ports should be marked as ready to run again */
932 zfcp_erp_modify_adapter_status(adapter, 30, 0, 930 zfcp_erp_modify_adapter_status(adapter, 30, NULL,
933 ZFCP_STATUS_COMMON_RUNNING, 931 ZFCP_STATUS_COMMON_RUNNING,
934 ZFCP_SET); 932 ZFCP_SET);
935 zfcp_erp_adapter_reopen(adapter, 933 zfcp_erp_adapter_reopen(adapter,
936 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 934 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED
937 | ZFCP_STATUS_COMMON_ERP_FAILED, 935 | ZFCP_STATUS_COMMON_ERP_FAILED,
938 102, (u64)fsf_req); 936 102, fsf_req);
939 break; 937 break;
940 938
941 case FSF_STATUS_READ_NOTIFICATION_LOST: 939 case FSF_STATUS_READ_NOTIFICATION_LOST:
@@ -969,14 +967,13 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
969 967
970 if (status_buffer->status_subtype & 968 if (status_buffer->status_subtype &
971 FSF_STATUS_READ_SUB_ACT_UPDATED) 969 FSF_STATUS_READ_SUB_ACT_UPDATED)
972 zfcp_erp_adapter_access_changed(adapter, 135, 970 zfcp_erp_adapter_access_changed(adapter, 135, fsf_req);
973 (u64)fsf_req);
974 break; 971 break;
975 972
976 case FSF_STATUS_READ_CFDC_UPDATED: 973 case FSF_STATUS_READ_CFDC_UPDATED:
977 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", 974 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n",
978 zfcp_get_busid_by_adapter(adapter)); 975 zfcp_get_busid_by_adapter(adapter));
979 zfcp_erp_adapter_access_changed(adapter, 136, (u64)fsf_req); 976 zfcp_erp_adapter_access_changed(adapter, 136, fsf_req);
980 break; 977 break;
981 978
982 case FSF_STATUS_READ_CFDC_HARDENED: 979 case FSF_STATUS_READ_CFDC_HARDENED:
@@ -1044,7 +1041,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1044 ZFCP_LOG_INFO("restart adapter %s due to status read " 1041 ZFCP_LOG_INFO("restart adapter %s due to status read "
1045 "buffer shortage\n", 1042 "buffer shortage\n",
1046 zfcp_get_busid_by_adapter(adapter)); 1043 zfcp_get_busid_by_adapter(adapter));
1047 zfcp_erp_adapter_reopen(adapter, 0, 103, (u64)fsf_req); 1044 zfcp_erp_adapter_reopen(adapter, 0, 103, fsf_req);
1048 } 1045 }
1049 } 1046 }
1050 out: 1047 out:
@@ -1164,7 +1161,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1164 sizeof (union fsf_status_qual)); 1161 sizeof (union fsf_status_qual));
1165 /* Let's hope this sorts out the mess */ 1162 /* Let's hope this sorts out the mess */
1166 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104, 1163 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104,
1167 (u64)new_fsf_req); 1164 new_fsf_req);
1168 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1165 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1169 } 1166 }
1170 break; 1167 break;
@@ -1192,8 +1189,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1192 fsf_status_qual, 1189 fsf_status_qual,
1193 sizeof (union fsf_status_qual)); 1190 sizeof (union fsf_status_qual));
1194 /* Let's hope this sorts out the mess */ 1191 /* Let's hope this sorts out the mess */
1195 zfcp_erp_port_reopen(unit->port, 0, 105, 1192 zfcp_erp_port_reopen(unit->port, 0, 105, new_fsf_req);
1196 (u64)new_fsf_req);
1197 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1193 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1198 } 1194 }
1199 break; 1195 break;
@@ -1207,7 +1203,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1207 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " 1203 ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to "
1208 "be reopened\n", unit->port->wwpn, 1204 "be reopened\n", unit->port->wwpn,
1209 zfcp_get_busid_by_unit(unit)); 1205 zfcp_get_busid_by_unit(unit));
1210 zfcp_erp_port_boxed(unit->port, 47, (u64)new_fsf_req); 1206 zfcp_erp_port_boxed(unit->port, 47, new_fsf_req);
1211 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1207 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1212 | ZFCP_STATUS_FSFREQ_RETRY; 1208 | ZFCP_STATUS_FSFREQ_RETRY;
1213 break; 1209 break;
@@ -1218,7 +1214,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1218 "to be reopened\n", 1214 "to be reopened\n",
1219 unit->fcp_lun, unit->port->wwpn, 1215 unit->fcp_lun, unit->port->wwpn,
1220 zfcp_get_busid_by_unit(unit)); 1216 zfcp_get_busid_by_unit(unit));
1221 zfcp_erp_unit_boxed(unit, 48, (u64)new_fsf_req); 1217 zfcp_erp_unit_boxed(unit, 48, new_fsf_req);
1222 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1218 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1223 | ZFCP_STATUS_FSFREQ_RETRY; 1219 | ZFCP_STATUS_FSFREQ_RETRY;
1224 break; 1220 break;
@@ -1452,7 +1448,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1452 zfcp_get_busid_by_port(port), 1448 zfcp_get_busid_by_port(port),
1453 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1449 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1454 /* stop operation for this adapter */ 1450 /* stop operation for this adapter */
1455 zfcp_erp_adapter_shutdown(adapter, 0, 123, (u64)fsf_req); 1451 zfcp_erp_adapter_shutdown(adapter, 0, 123, fsf_req);
1456 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1452 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1457 break; 1453 break;
1458 1454
@@ -1492,7 +1488,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1492 break; 1488 break;
1493 } 1489 }
1494 } 1490 }
1495 zfcp_erp_port_access_denied(port, 55, (u64)fsf_req); 1491 zfcp_erp_port_access_denied(port, 55, fsf_req);
1496 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1492 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1497 break; 1493 break;
1498 1494
@@ -1516,7 +1512,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1516 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, 1512 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,
1517 (char *) &header->fsf_status_qual, 1513 (char *) &header->fsf_status_qual,
1518 sizeof (union fsf_status_qual)); 1514 sizeof (union fsf_status_qual));
1519 zfcp_erp_adapter_reopen(adapter, 0, 106, (u64)fsf_req); 1515 zfcp_erp_adapter_reopen(adapter, 0, 106, fsf_req);
1520 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1516 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1521 break; 1517 break;
1522 1518
@@ -1524,7 +1520,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1524 ZFCP_LOG_INFO("port needs to be reopened " 1520 ZFCP_LOG_INFO("port needs to be reopened "
1525 "(adapter %s, port d_id=0x%06x)\n", 1521 "(adapter %s, port d_id=0x%06x)\n",
1526 zfcp_get_busid_by_port(port), port->d_id); 1522 zfcp_get_busid_by_port(port), port->d_id);
1527 zfcp_erp_port_boxed(port, 49, (u64)fsf_req); 1523 zfcp_erp_port_boxed(port, 49, fsf_req);
1528 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 1524 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
1529 | ZFCP_STATUS_FSFREQ_RETRY; 1525 | ZFCP_STATUS_FSFREQ_RETRY;
1530 break; 1526 break;
@@ -1746,7 +1742,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1746 zfcp_get_busid_by_adapter(adapter), 1742 zfcp_get_busid_by_adapter(adapter),
1747 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1743 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1748 /* stop operation for this adapter */ 1744 /* stop operation for this adapter */
1749 zfcp_erp_adapter_shutdown(adapter, 0, 124, (u64)fsf_req); 1745 zfcp_erp_adapter_shutdown(adapter, 0, 124, fsf_req);
1750 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1746 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1751 break; 1747 break;
1752 1748
@@ -1842,7 +1838,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1842 } 1838 }
1843 } 1839 }
1844 if (port != NULL) 1840 if (port != NULL)
1845 zfcp_erp_port_access_denied(port, 56, (u64)fsf_req); 1841 zfcp_erp_port_access_denied(port, 56, fsf_req);
1846 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1842 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1847 break; 1843 break;
1848 1844
@@ -2060,7 +2056,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2060 "versions in comparison to this device " 2056 "versions in comparison to this device "
2061 "driver (try updated device driver)\n", 2057 "driver (try updated device driver)\n",
2062 zfcp_get_busid_by_adapter(adapter)); 2058 zfcp_get_busid_by_adapter(adapter));
2063 zfcp_erp_adapter_shutdown(adapter, 0, 125, (u64)fsf_req); 2059 zfcp_erp_adapter_shutdown(adapter, 0, 125, fsf_req);
2064 return -EIO; 2060 return -EIO;
2065 } 2061 }
2066 if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) { 2062 if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) {
@@ -2069,7 +2065,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2069 "versions than this device driver uses" 2065 "versions than this device driver uses"
2070 "(consider a microcode upgrade)\n", 2066 "(consider a microcode upgrade)\n",
2071 zfcp_get_busid_by_adapter(adapter)); 2067 zfcp_get_busid_by_adapter(adapter));
2072 zfcp_erp_adapter_shutdown(adapter, 0, 126, (u64)fsf_req); 2068 zfcp_erp_adapter_shutdown(adapter, 0, 126, fsf_req);
2073 return -EIO; 2069 return -EIO;
2074 } 2070 }
2075 return 0; 2071 return 0;
@@ -2115,7 +2111,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2115 "topology detected at adapter %s " 2111 "topology detected at adapter %s "
2116 "unsupported, shutting down adapter\n", 2112 "unsupported, shutting down adapter\n",
2117 zfcp_get_busid_by_adapter(adapter)); 2113 zfcp_get_busid_by_adapter(adapter));
2118 zfcp_erp_adapter_shutdown(adapter, 0, 127, (u64)fsf_req); 2114 zfcp_erp_adapter_shutdown(adapter, 0, 127, fsf_req);
2119 return -EIO; 2115 return -EIO;
2120 case FC_PORTTYPE_NPORT: 2116 case FC_PORTTYPE_NPORT:
2121 ZFCP_LOG_NORMAL("Switched fabric fibrechannel " 2117 ZFCP_LOG_NORMAL("Switched fabric fibrechannel "
@@ -2130,7 +2126,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2130 "of a type known to the zfcp " 2126 "of a type known to the zfcp "
2131 "driver, shutting down adapter\n", 2127 "driver, shutting down adapter\n",
2132 zfcp_get_busid_by_adapter(adapter)); 2128 zfcp_get_busid_by_adapter(adapter));
2133 zfcp_erp_adapter_shutdown(adapter, 0, 128, (u64)fsf_req); 2129 zfcp_erp_adapter_shutdown(adapter, 0, 128, fsf_req);
2134 return -EIO; 2130 return -EIO;
2135 } 2131 }
2136 bottom = &qtcb->bottom.config; 2132 bottom = &qtcb->bottom.config;
@@ -2142,7 +2138,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2142 bottom->max_qtcb_size, 2138 bottom->max_qtcb_size,
2143 zfcp_get_busid_by_adapter(adapter), 2139 zfcp_get_busid_by_adapter(adapter),
2144 sizeof(struct fsf_qtcb)); 2140 sizeof(struct fsf_qtcb));
2145 zfcp_erp_adapter_shutdown(adapter, 0, 129, (u64)fsf_req); 2141 zfcp_erp_adapter_shutdown(adapter, 0, 129, fsf_req);
2146 return -EIO; 2142 return -EIO;
2147 } 2143 }
2148 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 2144 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
@@ -2159,7 +2155,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2159 &qtcb->header.fsf_status_qual.link_down_info); 2155 &qtcb->header.fsf_status_qual.link_down_info);
2160 break; 2156 break;
2161 default: 2157 default:
2162 zfcp_erp_adapter_shutdown(adapter, 0, 130, (u64)fsf_req); 2158 zfcp_erp_adapter_shutdown(adapter, 0, 130, fsf_req);
2163 return -EIO; 2159 return -EIO;
2164 } 2160 }
2165 return 0; 2161 return 0;
@@ -2458,7 +2454,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2458 break; 2454 break;
2459 } 2455 }
2460 } 2456 }
2461 zfcp_erp_port_access_denied(port, 57, (u64)fsf_req); 2457 zfcp_erp_port_access_denied(port, 57, fsf_req);
2462 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2458 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2463 break; 2459 break;
2464 2460
@@ -2467,7 +2463,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2467 "The remote port 0x%016Lx on adapter %s " 2463 "The remote port 0x%016Lx on adapter %s "
2468 "could not be opened. Disabling it.\n", 2464 "could not be opened. Disabling it.\n",
2469 port->wwpn, zfcp_get_busid_by_port(port)); 2465 port->wwpn, zfcp_get_busid_by_port(port));
2470 zfcp_erp_port_failed(port, 31, (u64)fsf_req); 2466 zfcp_erp_port_failed(port, 31, fsf_req);
2471 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2467 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2472 break; 2468 break;
2473 2469
@@ -2487,7 +2483,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
2487 "Disabling it.\n", 2483 "Disabling it.\n",
2488 port->wwpn, 2484 port->wwpn,
2489 zfcp_get_busid_by_port(port)); 2485 zfcp_get_busid_by_port(port));
2490 zfcp_erp_port_failed(port, 32, (u64)fsf_req); 2486 zfcp_erp_port_failed(port, 32, fsf_req);
2491 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2487 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2492 break; 2488 break;
2493 default: 2489 default:
@@ -2669,7 +2665,7 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2669 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 2665 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
2670 (char *) &fsf_req->qtcb->header.fsf_status_qual, 2666 (char *) &fsf_req->qtcb->header.fsf_status_qual,
2671 sizeof (union fsf_status_qual)); 2667 sizeof (union fsf_status_qual));
2672 zfcp_erp_adapter_reopen(port->adapter, 0, 107, (u64)fsf_req); 2668 zfcp_erp_adapter_reopen(port->adapter, 0, 107, fsf_req);
2673 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2669 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2674 break; 2670 break;
2675 2671
@@ -2684,7 +2680,7 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2684 ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " 2680 ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, "
2685 "port handle 0x%x\n", port->wwpn, 2681 "port handle 0x%x\n", port->wwpn,
2686 zfcp_get_busid_by_port(port), port->handle); 2682 zfcp_get_busid_by_port(port), port->handle);
2687 zfcp_erp_modify_port_status(port, 33, (u64)fsf_req, 2683 zfcp_erp_modify_port_status(port, 33, fsf_req,
2688 ZFCP_STATUS_COMMON_OPEN, 2684 ZFCP_STATUS_COMMON_OPEN,
2689 ZFCP_CLEAR); 2685 ZFCP_CLEAR);
2690 retval = 0; 2686 retval = 0;
@@ -2806,7 +2802,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2806 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 2802 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
2807 (char *) &header->fsf_status_qual, 2803 (char *) &header->fsf_status_qual,
2808 sizeof (union fsf_status_qual)); 2804 sizeof (union fsf_status_qual));
2809 zfcp_erp_adapter_reopen(port->adapter, 0, 108, (u64)fsf_req); 2805 zfcp_erp_adapter_reopen(port->adapter, 0, 108, fsf_req);
2810 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2806 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2811 break; 2807 break;
2812 2808
@@ -2827,7 +2823,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2827 break; 2823 break;
2828 } 2824 }
2829 } 2825 }
2830 zfcp_erp_port_access_denied(port, 58, (u64)fsf_req); 2826 zfcp_erp_port_access_denied(port, 58, fsf_req);
2831 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2827 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2832 break; 2828 break;
2833 2829
@@ -2837,7 +2833,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2837 "to close it physically.\n", 2833 "to close it physically.\n",
2838 port->wwpn, 2834 port->wwpn,
2839 zfcp_get_busid_by_port(port)); 2835 zfcp_get_busid_by_port(port));
2840 zfcp_erp_port_boxed(port, 50, (u64)fsf_req); 2836 zfcp_erp_port_boxed(port, 50, fsf_req);
2841 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 2837 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
2842 ZFCP_STATUS_FSFREQ_RETRY; 2838 ZFCP_STATUS_FSFREQ_RETRY;
2843 2839
@@ -3016,8 +3012,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3016 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3012 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3017 (char *) &header->fsf_status_qual, 3013 (char *) &header->fsf_status_qual,
3018 sizeof (union fsf_status_qual)); 3014 sizeof (union fsf_status_qual));
3019 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, 3015 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, fsf_req);
3020 (u64)fsf_req);
3021 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3016 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3022 break; 3017 break;
3023 3018
@@ -3047,7 +3042,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3047 break; 3042 break;
3048 } 3043 }
3049 } 3044 }
3050 zfcp_erp_unit_access_denied(unit, 59, (u64)fsf_req); 3045 zfcp_erp_unit_access_denied(unit, 59, fsf_req);
3051 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); 3046 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
3052 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 3047 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
3053 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3048 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3057,7 +3052,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3057 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3052 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3058 "needs to be reopened\n", 3053 "needs to be reopened\n",
3059 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3054 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
3060 zfcp_erp_port_boxed(unit->port, 51, (u64)fsf_req); 3055 zfcp_erp_port_boxed(unit->port, 51, fsf_req);
3061 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3056 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3062 ZFCP_STATUS_FSFREQ_RETRY; 3057 ZFCP_STATUS_FSFREQ_RETRY;
3063 break; 3058 break;
@@ -3097,7 +3092,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3097 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3092 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3098 (char *) &header->fsf_status_qual, 3093 (char *) &header->fsf_status_qual,
3099 sizeof (union fsf_status_qual)); 3094 sizeof (union fsf_status_qual));
3100 zfcp_erp_unit_access_denied(unit, 60, (u64)fsf_req); 3095 zfcp_erp_unit_access_denied(unit, 60, fsf_req);
3101 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); 3096 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
3102 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 3097 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
3103 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3098 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -3111,7 +3106,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3111 unit->fcp_lun, 3106 unit->fcp_lun,
3112 unit->port->wwpn, 3107 unit->port->wwpn,
3113 zfcp_get_busid_by_unit(unit)); 3108 zfcp_get_busid_by_unit(unit));
3114 zfcp_erp_unit_failed(unit, 34, (u64)fsf_req); 3109 zfcp_erp_unit_failed(unit, 34, fsf_req);
3115 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3110 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3116 break; 3111 break;
3117 3112
@@ -3181,17 +3176,15 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3181 if (exclusive && !readwrite) { 3176 if (exclusive && !readwrite) {
3182 ZFCP_LOG_NORMAL("exclusive access of read-only " 3177 ZFCP_LOG_NORMAL("exclusive access of read-only "
3183 "unit not supported\n"); 3178 "unit not supported\n");
3184 zfcp_erp_unit_failed(unit, 35, (u64)fsf_req); 3179 zfcp_erp_unit_failed(unit, 35, fsf_req);
3185 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3180 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3186 zfcp_erp_unit_shutdown(unit, 0, 80, 3181 zfcp_erp_unit_shutdown(unit, 0, 80, fsf_req);
3187 (u64)fsf_req);
3188 } else if (!exclusive && readwrite) { 3182 } else if (!exclusive && readwrite) {
3189 ZFCP_LOG_NORMAL("shared access of read-write " 3183 ZFCP_LOG_NORMAL("shared access of read-write "
3190 "unit not supported\n"); 3184 "unit not supported\n");
3191 zfcp_erp_unit_failed(unit, 36, (u64)fsf_req); 3185 zfcp_erp_unit_failed(unit, 36, fsf_req);
3192 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3186 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3193 zfcp_erp_unit_shutdown(unit, 0, 81, 3187 zfcp_erp_unit_shutdown(unit, 0, 81, fsf_req);
3194 (u64)fsf_req);
3195 } 3188 }
3196 } 3189 }
3197 3190
@@ -3314,8 +3307,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3314 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3307 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3315 (char *) &fsf_req->qtcb->header.fsf_status_qual, 3308 (char *) &fsf_req->qtcb->header.fsf_status_qual,
3316 sizeof (union fsf_status_qual)); 3309 sizeof (union fsf_status_qual));
3317 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, 3310 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, fsf_req);
3318 (u64)fsf_req);
3319 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3311 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3320 break; 3312 break;
3321 3313
@@ -3331,7 +3323,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3331 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3323 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3332 (char *) &fsf_req->qtcb->header.fsf_status_qual, 3324 (char *) &fsf_req->qtcb->header.fsf_status_qual,
3333 sizeof (union fsf_status_qual)); 3325 sizeof (union fsf_status_qual));
3334 zfcp_erp_port_reopen(unit->port, 0, 111, (u64)fsf_req); 3326 zfcp_erp_port_reopen(unit->port, 0, 111, fsf_req);
3335 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3327 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3336 break; 3328 break;
3337 3329
@@ -3340,7 +3332,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3340 "needs to be reopened\n", 3332 "needs to be reopened\n",
3341 unit->port->wwpn, 3333 unit->port->wwpn,
3342 zfcp_get_busid_by_unit(unit)); 3334 zfcp_get_busid_by_unit(unit));
3343 zfcp_erp_port_boxed(unit->port, 52, (u64)fsf_req); 3335 zfcp_erp_port_boxed(unit->port, 52, fsf_req);
3344 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3336 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3345 ZFCP_STATUS_FSFREQ_RETRY; 3337 ZFCP_STATUS_FSFREQ_RETRY;
3346 break; 3338 break;
@@ -3534,7 +3526,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
3534 zfcp_get_busid_by_unit(unit), 3526 zfcp_get_busid_by_unit(unit),
3535 unit->port->wwpn, 3527 unit->port->wwpn,
3536 unit->fcp_lun); 3528 unit->fcp_lun);
3537 zfcp_erp_unit_shutdown(unit, 0, 131, (u64)fsf_req); 3529 zfcp_erp_unit_shutdown(unit, 0, 131, fsf_req);
3538 retval = -EINVAL; 3530 retval = -EINVAL;
3539 } 3531 }
3540 goto no_fit; 3532 goto no_fit;
@@ -3692,8 +3684,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3692 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3684 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3693 (char *) &header->fsf_status_qual, 3685 (char *) &header->fsf_status_qual,
3694 sizeof (union fsf_status_qual)); 3686 sizeof (union fsf_status_qual));
3695 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, 3687 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, fsf_req);
3696 (u64)fsf_req);
3697 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3688 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3698 break; 3689 break;
3699 3690
@@ -3709,7 +3700,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3709 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, 3700 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
3710 (char *) &header->fsf_status_qual, 3701 (char *) &header->fsf_status_qual,
3711 sizeof (union fsf_status_qual)); 3702 sizeof (union fsf_status_qual));
3712 zfcp_erp_port_reopen(unit->port, 0, 113, (u64)fsf_req); 3703 zfcp_erp_port_reopen(unit->port, 0, 113, fsf_req);
3713 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3704 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3714 break; 3705 break;
3715 3706
@@ -3725,8 +3716,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3725 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, 3716 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
3726 (char *) &header->fsf_status_qual, 3717 (char *) &header->fsf_status_qual,
3727 sizeof (union fsf_status_qual)); 3718 sizeof (union fsf_status_qual));
3728 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114, 3719 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114, fsf_req);
3729 (u64)fsf_req);
3730 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3720 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3731 break; 3721 break;
3732 3722
@@ -3736,8 +3726,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3736 zfcp_get_busid_by_unit(unit), 3726 zfcp_get_busid_by_unit(unit),
3737 ZFCP_FC_SERVICE_CLASS_DEFAULT); 3727 ZFCP_FC_SERVICE_CLASS_DEFAULT);
3738 /* stop operation for this adapter */ 3728 /* stop operation for this adapter */
3739 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132, 3729 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132, fsf_req);
3740 (u64)fsf_req);
3741 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3730 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3742 break; 3731 break;
3743 3732
@@ -3753,7 +3742,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3753 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, 3742 ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
3754 (char *) &header->fsf_status_qual, 3743 (char *) &header->fsf_status_qual,
3755 sizeof (union fsf_status_qual)); 3744 sizeof (union fsf_status_qual));
3756 zfcp_erp_port_reopen(unit->port, 0, 115, (u64)fsf_req); 3745 zfcp_erp_port_reopen(unit->port, 0, 115, fsf_req);
3757 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3746 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3758 break; 3747 break;
3759 3748
@@ -3775,7 +3764,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3775 break; 3764 break;
3776 } 3765 }
3777 } 3766 }
3778 zfcp_erp_unit_access_denied(unit, 61, (u64)fsf_req); 3767 zfcp_erp_unit_access_denied(unit, 61, fsf_req);
3779 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3768 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3780 break; 3769 break;
3781 3770
@@ -3788,8 +3777,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3788 zfcp_get_busid_by_unit(unit), 3777 zfcp_get_busid_by_unit(unit),
3789 fsf_req->qtcb->bottom.io.data_direction); 3778 fsf_req->qtcb->bottom.io.data_direction);
3790 /* stop operation for this adapter */ 3779 /* stop operation for this adapter */
3791 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, 3780 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, fsf_req);
3792 (u64)fsf_req);
3793 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3781 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3794 break; 3782 break;
3795 3783
@@ -3802,8 +3790,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3802 zfcp_get_busid_by_unit(unit), 3790 zfcp_get_busid_by_unit(unit),
3803 fsf_req->qtcb->bottom.io.fcp_cmnd_length); 3791 fsf_req->qtcb->bottom.io.fcp_cmnd_length);
3804 /* stop operation for this adapter */ 3792 /* stop operation for this adapter */
3805 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, 3793 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, fsf_req);
3806 (u64)fsf_req);
3807 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3794 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3808 break; 3795 break;
3809 3796
@@ -3811,7 +3798,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3811 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " 3798 ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
3812 "needs to be reopened\n", 3799 "needs to be reopened\n",
3813 unit->port->wwpn, zfcp_get_busid_by_unit(unit)); 3800 unit->port->wwpn, zfcp_get_busid_by_unit(unit));
3814 zfcp_erp_port_boxed(unit->port, 53, (u64)fsf_req); 3801 zfcp_erp_port_boxed(unit->port, 53, fsf_req);
3815 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3802 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3816 ZFCP_STATUS_FSFREQ_RETRY; 3803 ZFCP_STATUS_FSFREQ_RETRY;
3817 break; 3804 break;
@@ -3821,7 +3808,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3821 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", 3808 "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n",
3822 zfcp_get_busid_by_unit(unit), 3809 zfcp_get_busid_by_unit(unit),
3823 unit->port->wwpn, unit->fcp_lun); 3810 unit->port->wwpn, unit->fcp_lun);
3824 zfcp_erp_unit_boxed(unit, 54, (u64)fsf_req); 3811 zfcp_erp_unit_boxed(unit, 54, fsf_req);
3825 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR 3812 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR
3826 | ZFCP_STATUS_FSFREQ_RETRY; 3813 | ZFCP_STATUS_FSFREQ_RETRY;
3827 break; 3814 break;
@@ -4681,7 +4668,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req)
4681 req_queue->free_index -= fsf_req->sbal_number; 4668 req_queue->free_index -= fsf_req->sbal_number;
4682 req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q; 4669 req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q;
4683 req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ 4670 req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */
4684 zfcp_erp_adapter_reopen(adapter, 0, 116, (u64)fsf_req); 4671 zfcp_erp_adapter_reopen(adapter, 0, 116, fsf_req);
4685 } else { 4672 } else {
4686 req_queue->distance_from_int = new_distance_from_int; 4673 req_queue->distance_from_int = new_distance_from_int;
4687 /* 4674 /*
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 5d60a4116aff..8ca5f074c687 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -176,7 +176,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, unsigned int status,
176 */ 176 */
177 zfcp_erp_adapter_reopen(adapter, 177 zfcp_erp_adapter_reopen(adapter,
178 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 178 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
179 ZFCP_STATUS_COMMON_ERP_FAILED, 140, 0); 179 ZFCP_STATUS_COMMON_ERP_FAILED, 140,
180 NULL);
180 } 181 }
181 return retval; 182 return retval;
182} 183}
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index cd844b2ad7a1..3c9880e46e81 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -185,7 +185,7 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
185 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); 185 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
186 sdpnt->hostdata = NULL; 186 sdpnt->hostdata = NULL;
187 unit->device = NULL; 187 unit->device = NULL;
188 zfcp_erp_unit_failed(unit, 12, 0); 188 zfcp_erp_unit_failed(unit, 12, NULL);
189 zfcp_unit_put(unit); 189 zfcp_unit_put(unit);
190 } else 190 } else
191 ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at " 191 ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at "
@@ -529,7 +529,7 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
529 unit->fcp_lun, unit->port->wwpn, 529 unit->fcp_lun, unit->port->wwpn,
530 zfcp_get_busid_by_adapter(unit->port->adapter)); 530 zfcp_get_busid_by_adapter(unit->port->adapter));
531 531
532 zfcp_erp_adapter_reopen(adapter, 0, 141, (u64)scpnt); 532 zfcp_erp_adapter_reopen(adapter, 0, 141, scpnt);
533 zfcp_erp_wait(adapter); 533 zfcp_erp_wait(adapter);
534 534
535 return SUCCESS; 535 return SUCCESS;
diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c
index e0bbcc440a52..ccbba4dd3a77 100644
--- a/drivers/s390/scsi/zfcp_sysfs_adapter.c
+++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c
@@ -89,7 +89,7 @@ zfcp_sysfs_port_add_store(struct device *dev, struct device_attribute *attr, con
89 89
90 retval = 0; 90 retval = 0;
91 91
92 zfcp_erp_port_reopen(port, 0, 91, 0); 92 zfcp_erp_port_reopen(port, 0, 91, NULL);
93 zfcp_erp_wait(port->adapter); 93 zfcp_erp_wait(port->adapter);
94 zfcp_port_put(port); 94 zfcp_port_put(port);
95 out: 95 out:
@@ -147,7 +147,7 @@ zfcp_sysfs_port_remove_store(struct device *dev, struct device_attribute *attr,
147 goto out; 147 goto out;
148 } 148 }
149 149
150 zfcp_erp_port_shutdown(port, 0, 92, 0); 150 zfcp_erp_port_shutdown(port, 0, 92, NULL);
151 zfcp_erp_wait(adapter); 151 zfcp_erp_wait(adapter);
152 zfcp_port_put(port); 152 zfcp_port_put(port);
153 zfcp_port_dequeue(port); 153 zfcp_port_dequeue(port);
@@ -191,9 +191,10 @@ zfcp_sysfs_adapter_failed_store(struct device *dev, struct device_attribute *att
191 goto out; 191 goto out;
192 } 192 }
193 193
194 zfcp_erp_modify_adapter_status(adapter, 44, 0, 194 zfcp_erp_modify_adapter_status(adapter, 44, NULL,
195 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); 195 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
196 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 93, 0); 196 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 93,
197 NULL);
197 zfcp_erp_wait(adapter); 198 zfcp_erp_wait(adapter);
198 out: 199 out:
199 up(&zfcp_data.config_sema); 200 up(&zfcp_data.config_sema);
diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c
index 538195034c68..703c1b5cb602 100644
--- a/drivers/s390/scsi/zfcp_sysfs_port.c
+++ b/drivers/s390/scsi/zfcp_sysfs_port.c
@@ -94,7 +94,7 @@ zfcp_sysfs_unit_add_store(struct device *dev, struct device_attribute *attr, con
94 94
95 retval = 0; 95 retval = 0;
96 96
97 zfcp_erp_unit_reopen(unit, 0, 94, 0); 97 zfcp_erp_unit_reopen(unit, 0, 94, NULL);
98 zfcp_erp_wait(unit->port->adapter); 98 zfcp_erp_wait(unit->port->adapter);
99 zfcp_unit_put(unit); 99 zfcp_unit_put(unit);
100 out: 100 out:
@@ -150,7 +150,7 @@ zfcp_sysfs_unit_remove_store(struct device *dev, struct device_attribute *attr,
150 goto out; 150 goto out;
151 } 151 }
152 152
153 zfcp_erp_unit_shutdown(unit, 0, 95, 0); 153 zfcp_erp_unit_shutdown(unit, 0, 95, NULL);
154 zfcp_erp_wait(unit->port->adapter); 154 zfcp_erp_wait(unit->port->adapter);
155 zfcp_unit_put(unit); 155 zfcp_unit_put(unit);
156 zfcp_unit_dequeue(unit); 156 zfcp_unit_dequeue(unit);
@@ -193,9 +193,9 @@ zfcp_sysfs_port_failed_store(struct device *dev, struct device_attribute *attr,
193 goto out; 193 goto out;
194 } 194 }
195 195
196 zfcp_erp_modify_port_status(port, 45, 0, 196 zfcp_erp_modify_port_status(port, 45, NULL,
197 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); 197 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
198 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 96, 0); 198 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 96, NULL);
199 zfcp_erp_wait(port->adapter); 199 zfcp_erp_wait(port->adapter);
200 out: 200 out:
201 up(&zfcp_data.config_sema); 201 up(&zfcp_data.config_sema);
diff --git a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c
index fd73568b44b4..80fb2c2cf48a 100644
--- a/drivers/s390/scsi/zfcp_sysfs_unit.c
+++ b/drivers/s390/scsi/zfcp_sysfs_unit.c
@@ -94,9 +94,9 @@ zfcp_sysfs_unit_failed_store(struct device *dev, struct device_attribute *attr,
94 goto out; 94 goto out;
95 } 95 }
96 96
97 zfcp_erp_modify_unit_status(unit, 46, 0, 97 zfcp_erp_modify_unit_status(unit, 46, NULL,
98 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); 98 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
99 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, 97, 0); 99 zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, 97, NULL);
100 zfcp_erp_wait(unit->port->adapter); 100 zfcp_erp_wait(unit->port->adapter);
101 out: 101 out:
102 up(&zfcp_data.config_sema); 102 up(&zfcp_data.config_sema);