aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-08-18 09:43:21 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 09:49:30 -0400
commit5771710bd5edfafcb8656f49b93690a6fae5a4d2 (patch)
treef7ca88bc0f3d780794aa564855c0ed0ddeb9af18 /drivers/s390/scsi/zfcp_erp.c
parent799b76d09aeee558d18c1f5b93e63f58f1d1fc11 (diff)
[SCSI] zfcp: Update dbf calls
Change the dbf data and functions to use the zfcp_dbf prefix throughout the code. Also change the calls to dbf to use zfcp_dbf instead of zfcp_adapter. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 67297d2744fb..373567eda8f6 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -74,9 +74,9 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act)
74 struct zfcp_adapter *adapter = act->adapter; 74 struct zfcp_adapter *adapter = act->adapter;
75 75
76 list_move(&act->list, &act->adapter->erp_ready_head); 76 list_move(&act->list, &act->adapter->erp_ready_head);
77 zfcp_rec_dbf_event_action("erardy1", act); 77 zfcp_dbf_rec_action("erardy1", act);
78 up(&adapter->erp_ready_sem); 78 up(&adapter->erp_ready_sem);
79 zfcp_rec_dbf_event_thread("erardy2", adapter); 79 zfcp_dbf_rec_thread("erardy2", adapter->dbf);
80} 80}
81 81
82static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act) 82static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act)
@@ -227,11 +227,10 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
227 ++adapter->erp_total_count; 227 ++adapter->erp_total_count;
228 list_add_tail(&act->list, &adapter->erp_ready_head); 228 list_add_tail(&act->list, &adapter->erp_ready_head);
229 up(&adapter->erp_ready_sem); 229 up(&adapter->erp_ready_sem);
230 zfcp_rec_dbf_event_thread("eracte1", adapter); 230 zfcp_dbf_rec_thread("eracte1", adapter->dbf);
231 retval = 0; 231 retval = 0;
232 out: 232 out:
233 zfcp_rec_dbf_event_trigger(id, ref, want, need, act, 233 zfcp_dbf_rec_trigger(id, ref, want, need, act, adapter, port, unit);
234 adapter, port, unit);
235 return retval; 234 return retval;
236} 235}
237 236
@@ -442,28 +441,28 @@ static int status_change_clear(unsigned long mask, atomic_t *status)
442static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) 441static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter)
443{ 442{
444 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status)) 443 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status))
445 zfcp_rec_dbf_event_adapter("eraubl1", NULL, adapter); 444 zfcp_dbf_rec_adapter("eraubl1", NULL, adapter->dbf);
446 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status); 445 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status);
447} 446}
448 447
449static void zfcp_erp_port_unblock(struct zfcp_port *port) 448static void zfcp_erp_port_unblock(struct zfcp_port *port)
450{ 449{
451 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status)) 450 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status))
452 zfcp_rec_dbf_event_port("erpubl1", NULL, port); 451 zfcp_dbf_rec_port("erpubl1", NULL, port);
453 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status); 452 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status);
454} 453}
455 454
456static void zfcp_erp_unit_unblock(struct zfcp_unit *unit) 455static void zfcp_erp_unit_unblock(struct zfcp_unit *unit)
457{ 456{
458 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status)) 457 if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status))
459 zfcp_rec_dbf_event_unit("eruubl1", NULL, unit); 458 zfcp_dbf_rec_unit("eruubl1", NULL, unit);
460 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status); 459 atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status);
461} 460}
462 461
463static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) 462static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action)
464{ 463{
465 list_move(&erp_action->list, &erp_action->adapter->erp_running_head); 464 list_move(&erp_action->list, &erp_action->adapter->erp_running_head);
466 zfcp_rec_dbf_event_action("erator1", erp_action); 465 zfcp_dbf_rec_action("erator1", erp_action);
467} 466}
468 467
469static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) 468static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
@@ -479,11 +478,11 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
479 if (act->status & (ZFCP_STATUS_ERP_DISMISSED | 478 if (act->status & (ZFCP_STATUS_ERP_DISMISSED |
480 ZFCP_STATUS_ERP_TIMEDOUT)) { 479 ZFCP_STATUS_ERP_TIMEDOUT)) {
481 act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; 480 act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
482 zfcp_rec_dbf_event_action("erscf_1", act); 481 zfcp_dbf_rec_action("erscf_1", act);
483 act->fsf_req->erp_action = NULL; 482 act->fsf_req->erp_action = NULL;
484 } 483 }
485 if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) 484 if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
486 zfcp_rec_dbf_event_action("erscf_2", act); 485 zfcp_dbf_rec_action("erscf_2", act);
487 if (act->fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) 486 if (act->fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED)
488 act->fsf_req = NULL; 487 act->fsf_req = NULL;
489 } else 488 } else
@@ -641,9 +640,9 @@ static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action)
641 return ZFCP_ERP_FAILED; 640 return ZFCP_ERP_FAILED;
642 } 641 }
643 642
644 zfcp_rec_dbf_event_thread_lock("erasfx1", adapter); 643 zfcp_dbf_rec_thread_lock("erasfx1", adapter->dbf);
645 down(&adapter->erp_ready_sem); 644 down(&adapter->erp_ready_sem);
646 zfcp_rec_dbf_event_thread_lock("erasfx2", adapter); 645 zfcp_dbf_rec_thread_lock("erasfx2", adapter->dbf);
647 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) 646 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT)
648 break; 647 break;
649 648
@@ -682,9 +681,9 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act)
682 if (ret) 681 if (ret)
683 return ZFCP_ERP_FAILED; 682 return ZFCP_ERP_FAILED;
684 683
685 zfcp_rec_dbf_event_thread_lock("erasox1", adapter); 684 zfcp_dbf_rec_thread_lock("erasox1", adapter->dbf);
686 down(&adapter->erp_ready_sem); 685 down(&adapter->erp_ready_sem);
687 zfcp_rec_dbf_event_thread_lock("erasox2", adapter); 686 zfcp_dbf_rec_thread_lock("erasox2", adapter->dbf);
688 if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) 687 if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
689 return ZFCP_ERP_FAILED; 688 return ZFCP_ERP_FAILED;
690 689
@@ -1138,7 +1137,7 @@ static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action)
1138 } 1137 }
1139 1138
1140 list_del(&erp_action->list); 1139 list_del(&erp_action->list);
1141 zfcp_rec_dbf_event_action("eractd1", erp_action); 1140 zfcp_dbf_rec_action("eractd1", erp_action);
1142 1141
1143 switch (erp_action->action) { 1142 switch (erp_action->action) {
1144 case ZFCP_ERP_ACTION_REOPEN_UNIT: 1143 case ZFCP_ERP_ACTION_REOPEN_UNIT:
@@ -1297,9 +1296,9 @@ static int zfcp_erp_thread(void *data)
1297 while (!(atomic_read(&adapter->status) & 1296 while (!(atomic_read(&adapter->status) &
1298 ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL)) { 1297 ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL)) {
1299 1298
1300 zfcp_rec_dbf_event_thread_lock("erthrd1", adapter); 1299 zfcp_dbf_rec_thread_lock("erthrd1", adapter->dbf);
1301 ignore = down_interruptible(&adapter->erp_ready_sem); 1300 ignore = down_interruptible(&adapter->erp_ready_sem);
1302 zfcp_rec_dbf_event_thread_lock("erthrd2", adapter); 1301 zfcp_dbf_rec_thread_lock("erthrd2", adapter->dbf);
1303 1302
1304 write_lock_irqsave(&adapter->erp_lock, flags); 1303 write_lock_irqsave(&adapter->erp_lock, flags);
1305 next = adapter->erp_ready_head.next; 1304 next = adapter->erp_ready_head.next;
@@ -1356,7 +1355,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter)
1356{ 1355{
1357 atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status); 1356 atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status);
1358 up(&adapter->erp_ready_sem); 1357 up(&adapter->erp_ready_sem);
1359 zfcp_rec_dbf_event_thread_lock("erthrk1", adapter); 1358 zfcp_dbf_rec_thread_lock("erthrk1", adapter->dbf);
1360 1359
1361 wait_event(adapter->erp_thread_wqh, 1360 wait_event(adapter->erp_thread_wqh,
1362 !(atomic_read(&adapter->status) & 1361 !(atomic_read(&adapter->status) &
@@ -1431,11 +1430,11 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, char *id,
1431 1430
1432 if (set_or_clear == ZFCP_SET) { 1431 if (set_or_clear == ZFCP_SET) {
1433 if (status_change_set(mask, &adapter->status)) 1432 if (status_change_set(mask, &adapter->status))
1434 zfcp_rec_dbf_event_adapter(id, ref, adapter); 1433 zfcp_dbf_rec_adapter(id, ref, adapter->dbf);
1435 atomic_set_mask(mask, &adapter->status); 1434 atomic_set_mask(mask, &adapter->status);
1436 } else { 1435 } else {
1437 if (status_change_clear(mask, &adapter->status)) 1436 if (status_change_clear(mask, &adapter->status))
1438 zfcp_rec_dbf_event_adapter(id, ref, adapter); 1437 zfcp_dbf_rec_adapter(id, ref, adapter->dbf);
1439 atomic_clear_mask(mask, &adapter->status); 1438 atomic_clear_mask(mask, &adapter->status);
1440 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) 1439 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
1441 atomic_set(&adapter->erp_counter, 0); 1440 atomic_set(&adapter->erp_counter, 0);
@@ -1465,11 +1464,11 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, char *id, void *ref,
1465 1464
1466 if (set_or_clear == ZFCP_SET) { 1465 if (set_or_clear == ZFCP_SET) {
1467 if (status_change_set(mask, &port->status)) 1466 if (status_change_set(mask, &port->status))
1468 zfcp_rec_dbf_event_port(id, ref, port); 1467 zfcp_dbf_rec_port(id, ref, port);
1469 atomic_set_mask(mask, &port->status); 1468 atomic_set_mask(mask, &port->status);
1470 } else { 1469 } else {
1471 if (status_change_clear(mask, &port->status)) 1470 if (status_change_clear(mask, &port->status))
1472 zfcp_rec_dbf_event_port(id, ref, port); 1471 zfcp_dbf_rec_port(id, ref, port);
1473 atomic_clear_mask(mask, &port->status); 1472 atomic_clear_mask(mask, &port->status);
1474 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) 1473 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED)
1475 atomic_set(&port->erp_counter, 0); 1474 atomic_set(&port->erp_counter, 0);
@@ -1494,11 +1493,11 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, char *id, void *ref,
1494{ 1493{
1495 if (set_or_clear == ZFCP_SET) { 1494 if (set_or_clear == ZFCP_SET) {
1496 if (status_change_set(mask, &unit->status)) 1495 if (status_change_set(mask, &unit->status))
1497 zfcp_rec_dbf_event_unit(id, ref, unit); 1496 zfcp_dbf_rec_unit(id, ref, unit);
1498 atomic_set_mask(mask, &unit->status); 1497 atomic_set_mask(mask, &unit->status);
1499 } else { 1498 } else {
1500 if (status_change_clear(mask, &unit->status)) 1499 if (status_change_clear(mask, &unit->status))
1501 zfcp_rec_dbf_event_unit(id, ref, unit); 1500 zfcp_dbf_rec_unit(id, ref, unit);
1502 atomic_clear_mask(mask, &unit->status); 1501 atomic_clear_mask(mask, &unit->status);
1503 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) { 1502 if (mask & ZFCP_STATUS_COMMON_ERP_FAILED) {
1504 atomic_set(&unit->erp_counter, 0); 1503 atomic_set(&unit->erp_counter, 0);