aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
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/s390/scsi/zfcp_erp.c
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/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c140
1 files changed, 73 insertions, 67 deletions
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