|
@@ -35,11 +35,23 @@ enum zfcp_erp_steps {
|
|
|
ZFCP_ERP_STEP_LUN_OPENING = 0x2000,
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * enum zfcp_erp_act_type - Type of ERP action object.
|
|
|
+ * @ZFCP_ERP_ACTION_REOPEN_LUN: LUN recovery.
|
|
|
+ * @ZFCP_ERP_ACTION_REOPEN_PORT: Port recovery.
|
|
|
+ * @ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: Forced port recovery.
|
|
|
+ * @ZFCP_ERP_ACTION_REOPEN_ADAPTER: Adapter recovery.
|
|
|
+ * @ZFCP_ERP_ACTION_NONE: Eyecatcher pseudo flag to bitwise or-combine with
|
|
|
+ * either of the other enum values.
|
|
|
+ * Used to indicate that an ERP action could not be
|
|
|
+ * set up despite a detected need for some recovery.
|
|
|
+ */
|
|
|
enum zfcp_erp_act_type {
|
|
|
ZFCP_ERP_ACTION_REOPEN_LUN = 1,
|
|
|
ZFCP_ERP_ACTION_REOPEN_PORT = 2,
|
|
|
ZFCP_ERP_ACTION_REOPEN_PORT_FORCED = 3,
|
|
|
ZFCP_ERP_ACTION_REOPEN_ADAPTER = 4,
|
|
|
+ ZFCP_ERP_ACTION_NONE = 0xc0,
|
|
|
};
|
|
|
|
|
|
enum zfcp_erp_act_state {
|
|
@@ -257,8 +269,10 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
|
|
|
goto out;
|
|
|
|
|
|
act = zfcp_erp_setup_act(need, act_status, adapter, port, sdev);
|
|
|
- if (!act)
|
|
|
+ if (!act) {
|
|
|
+ need |= ZFCP_ERP_ACTION_NONE; /* marker for trace */
|
|
|
goto out;
|
|
|
+ }
|
|
|
atomic_or(ZFCP_STATUS_ADAPTER_ERP_PENDING, &adapter->status);
|
|
|
++adapter->erp_total_count;
|
|
|
list_add_tail(&act->list, &adapter->erp_ready_head);
|