• Home
  • Raw
  • Download

Lines Matching refs:erp_action

89 		zfcp_erp_action_dismiss(&zfcp_sdev->erp_action);  in zfcp_erp_action_dismiss_lun()
97 zfcp_erp_action_dismiss(&port->erp_action); in zfcp_erp_action_dismiss_port()
112 zfcp_erp_action_dismiss(&adapter->erp_action); in zfcp_erp_action_dismiss_adapter()
219 struct zfcp_erp_action *erp_action; in zfcp_erp_setup_act() local
236 erp_action = &zfcp_sdev->erp_action; in zfcp_erp_setup_act()
237 WARN_ON_ONCE(erp_action->port != port); in zfcp_erp_setup_act()
238 WARN_ON_ONCE(erp_action->sdev != sdev); in zfcp_erp_setup_act()
250 erp_action = &port->erp_action; in zfcp_erp_setup_act()
251 WARN_ON_ONCE(erp_action->port != port); in zfcp_erp_setup_act()
252 WARN_ON_ONCE(erp_action->sdev != NULL); in zfcp_erp_setup_act()
261 erp_action = &adapter->erp_action; in zfcp_erp_setup_act()
262 WARN_ON_ONCE(erp_action->port != NULL); in zfcp_erp_setup_act()
263 WARN_ON_ONCE(erp_action->sdev != NULL); in zfcp_erp_setup_act()
270 WARN_ON_ONCE(erp_action->adapter != adapter); in zfcp_erp_setup_act()
271 memset(&erp_action->list, 0, sizeof(erp_action->list)); in zfcp_erp_setup_act()
272 memset(&erp_action->timer, 0, sizeof(erp_action->timer)); in zfcp_erp_setup_act()
273 erp_action->step = ZFCP_ERP_STEP_UNINITIALIZED; in zfcp_erp_setup_act()
274 erp_action->fsf_req_id = 0; in zfcp_erp_setup_act()
275 erp_action->type = need; in zfcp_erp_setup_act()
276 erp_action->status = act_status; in zfcp_erp_setup_act()
278 return erp_action; in zfcp_erp_setup_act()
537 zfcp_dbf_rec_run("eraubl1", &adapter->erp_action); in zfcp_erp_adapter_unblock()
545 zfcp_dbf_rec_run("erpubl1", &port->erp_action); in zfcp_erp_port_unblock()
555 zfcp_dbf_rec_run("erlubl1", &sdev_to_zfcp(sdev)->erp_action); in zfcp_erp_lun_unblock()
559 static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) in zfcp_erp_action_to_running() argument
561 list_move(&erp_action->list, &erp_action->adapter->erp_running_head); in zfcp_erp_action_to_running()
562 zfcp_dbf_rec_run("erator1", erp_action); in zfcp_erp_action_to_running()
575 if (req && req->erp_action == act) { in zfcp_erp_strategy_check_fsfreq()
583 WRITE_ONCE(req->erp_action, NULL); in zfcp_erp_strategy_check_fsfreq()
599 void zfcp_erp_notify(struct zfcp_erp_action *erp_action, unsigned long set_mask) in zfcp_erp_notify() argument
601 struct zfcp_adapter *adapter = erp_action->adapter; in zfcp_erp_notify()
605 if (zfcp_erp_action_is_running(erp_action)) { in zfcp_erp_notify()
606 erp_action->status |= set_mask; in zfcp_erp_notify()
607 zfcp_erp_action_ready(erp_action); in zfcp_erp_notify()
624 act = READ_ONCE(fsf_req->erp_action); in zfcp_erp_timeout_handler()
637 static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action) in zfcp_erp_strategy_memwait() argument
639 timer_setup(&erp_action->timer, zfcp_erp_memwait_handler, 0); in zfcp_erp_strategy_memwait()
640 erp_action->timer.expires = jiffies + HZ; in zfcp_erp_strategy_memwait()
641 add_timer(&erp_action->timer); in zfcp_erp_strategy_memwait()
742 struct zfcp_erp_action *erp_action) in zfcp_erp_adapter_strat_fsf_xconf() argument
746 struct zfcp_adapter *adapter = erp_action->adapter; in zfcp_erp_adapter_strat_fsf_xconf()
754 zfcp_erp_action_to_running(erp_action); in zfcp_erp_adapter_strat_fsf_xconf()
756 if (zfcp_fsf_exchange_config_data(erp_action)) { in zfcp_erp_adapter_strat_fsf_xconf()
764 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) in zfcp_erp_adapter_strat_fsf_xconf()
973 struct zfcp_erp_action *erp_action) in zfcp_erp_port_forced_strategy() argument
975 struct zfcp_port *port = erp_action->port; in zfcp_erp_port_forced_strategy()
978 switch (erp_action->step) { in zfcp_erp_port_forced_strategy()
982 return zfcp_erp_port_forced_strategy_close(erp_action); in zfcp_erp_port_forced_strategy()
1001 struct zfcp_erp_action *erp_action) in zfcp_erp_port_strategy_close() argument
1005 retval = zfcp_fsf_close_port(erp_action); in zfcp_erp_port_strategy_close()
1008 erp_action->step = ZFCP_ERP_STEP_PORT_CLOSING; in zfcp_erp_port_strategy_close()
1015 struct zfcp_erp_action *erp_action) in zfcp_erp_port_strategy_open_port() argument
1019 retval = zfcp_fsf_open_port(erp_action); in zfcp_erp_port_strategy_open_port()
1022 erp_action->step = ZFCP_ERP_STEP_PORT_OPENING; in zfcp_erp_port_strategy_open_port()
1084 struct zfcp_erp_action *erp_action) in zfcp_erp_port_strategy() argument
1086 struct zfcp_port *port = erp_action->port; in zfcp_erp_port_strategy()
1093 switch (erp_action->step) { in zfcp_erp_port_strategy()
1096 return zfcp_erp_port_strategy_close(erp_action); in zfcp_erp_port_strategy()
1112 if (erp_action->status & ZFCP_STATUS_ERP_CLOSE_ONLY) in zfcp_erp_port_strategy()
1115 return zfcp_erp_port_strategy_open_common(erp_action); in zfcp_erp_port_strategy()
1127 struct zfcp_erp_action *erp_action) in zfcp_erp_lun_strategy_close() argument
1129 int retval = zfcp_fsf_close_lun(erp_action); in zfcp_erp_lun_strategy_close()
1132 erp_action->step = ZFCP_ERP_STEP_LUN_CLOSING; in zfcp_erp_lun_strategy_close()
1139 struct zfcp_erp_action *erp_action) in zfcp_erp_lun_strategy_open() argument
1141 int retval = zfcp_fsf_open_lun(erp_action); in zfcp_erp_lun_strategy_open()
1144 erp_action->step = ZFCP_ERP_STEP_LUN_OPENING; in zfcp_erp_lun_strategy_open()
1151 struct zfcp_erp_action *erp_action) in zfcp_erp_lun_strategy() argument
1153 struct scsi_device *sdev = erp_action->sdev; in zfcp_erp_lun_strategy()
1156 switch (erp_action->step) { in zfcp_erp_lun_strategy()
1160 return zfcp_erp_lun_strategy_close(erp_action); in zfcp_erp_lun_strategy()
1166 if (erp_action->status & ZFCP_STATUS_ERP_CLOSE_ONLY) in zfcp_erp_lun_strategy()
1168 return zfcp_erp_lun_strategy_open(erp_action); in zfcp_erp_lun_strategy()
1293 struct zfcp_erp_action *erp_action, enum zfcp_erp_act_result result) in zfcp_erp_strategy_check_target() argument
1295 struct zfcp_adapter *adapter = erp_action->adapter; in zfcp_erp_strategy_check_target()
1296 struct zfcp_port *port = erp_action->port; in zfcp_erp_strategy_check_target()
1297 struct scsi_device *sdev = erp_action->sdev; in zfcp_erp_strategy_check_target()
1299 switch (erp_action->type) { in zfcp_erp_strategy_check_target()
1375 static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action) in zfcp_erp_action_dequeue() argument
1377 struct zfcp_adapter *adapter = erp_action->adapter; in zfcp_erp_action_dequeue()
1381 if (erp_action->status & ZFCP_STATUS_ERP_LOWMEM) { in zfcp_erp_action_dequeue()
1383 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM; in zfcp_erp_action_dequeue()
1386 list_del(&erp_action->list); in zfcp_erp_action_dequeue()
1387 zfcp_dbf_rec_run("eractd1", erp_action); in zfcp_erp_action_dequeue()
1389 switch (erp_action->type) { in zfcp_erp_action_dequeue()
1391 zfcp_sdev = sdev_to_zfcp(erp_action->sdev); in zfcp_erp_action_dequeue()
1399 &erp_action->port->status); in zfcp_erp_action_dequeue()
1404 &erp_action->adapter->status); in zfcp_erp_action_dequeue()
1429 zfcp_dbf_rec_run_lvl(4, "ertru_p", &port->erp_action); in zfcp_erp_try_rport_unblock()
1454 zfcp_dbf_rec_run_lvl(4, "ertru_l", &zsdev->erp_action); in zfcp_erp_try_rport_unblock()
1510 struct zfcp_erp_action *erp_action) in zfcp_erp_strategy_do_action() argument
1512 switch (erp_action->type) { in zfcp_erp_strategy_do_action()
1514 return zfcp_erp_adapter_strategy(erp_action); in zfcp_erp_strategy_do_action()
1516 return zfcp_erp_port_forced_strategy(erp_action); in zfcp_erp_strategy_do_action()
1518 return zfcp_erp_port_strategy(erp_action); in zfcp_erp_strategy_do_action()
1520 return zfcp_erp_lun_strategy(erp_action); in zfcp_erp_strategy_do_action()
1526 struct zfcp_erp_action *erp_action) in zfcp_erp_strategy() argument
1530 struct zfcp_adapter *adapter = erp_action->adapter; in zfcp_erp_strategy()
1535 zfcp_erp_strategy_check_fsfreq(erp_action); in zfcp_erp_strategy()
1537 if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) { in zfcp_erp_strategy()
1538 zfcp_erp_action_dequeue(erp_action); in zfcp_erp_strategy()
1543 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { in zfcp_erp_strategy()
1548 zfcp_erp_action_to_running(erp_action); in zfcp_erp_strategy()
1552 result = zfcp_erp_strategy_do_action(erp_action); in zfcp_erp_strategy()
1555 if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) in zfcp_erp_strategy()
1560 if (!(erp_action->status & ZFCP_STATUS_ERP_LOWMEM)) { in zfcp_erp_strategy()
1562 erp_action->status |= ZFCP_STATUS_ERP_LOWMEM; in zfcp_erp_strategy()
1567 zfcp_erp_strategy_memwait(erp_action); in zfcp_erp_strategy()
1573 if (erp_action->status & ZFCP_STATUS_ERP_LOWMEM) { in zfcp_erp_strategy()
1575 erp_action->status &= ~ZFCP_STATUS_ERP_LOWMEM; in zfcp_erp_strategy()
1587 result = zfcp_erp_strategy_check_target(erp_action, result); in zfcp_erp_strategy()
1588 zfcp_erp_action_dequeue(erp_action); in zfcp_erp_strategy()
1589 result = zfcp_erp_strategy_statechange(erp_action, result); in zfcp_erp_strategy()
1593 zfcp_erp_strategy_followup_success(erp_action); in zfcp_erp_strategy()
1595 zfcp_erp_strategy_followup_failed(erp_action); in zfcp_erp_strategy()
1601 zfcp_erp_action_cleanup(erp_action, result); in zfcp_erp_strategy()