Exemplo n.º 1
0
static int zfcp_erp_strategy_check_target(struct zfcp_erp_action *erp_action,
					  int result)
{
	struct zfcp_adapter *adapter = erp_action->adapter;
	struct zfcp_port *port = erp_action->port;
	struct zfcp_unit *unit = erp_action->unit;

	switch (erp_action->action) {

	case ZFCP_ERP_ACTION_REOPEN_UNIT:
		result = zfcp_erp_strategy_check_unit(unit, result);
		break;

	case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
	case ZFCP_ERP_ACTION_REOPEN_PORT:
		result = zfcp_erp_strategy_check_port(port, result);
		break;

	case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
		result = zfcp_erp_strategy_check_adapter(adapter, result);
		break;
	}
	return result;
}
Exemplo n.º 2
0
static int zfcp_erp_strategy_check_target(struct zfcp_erp_action *erp_action,
        int result)
{
    struct zfcp_adapter *adapter = erp_action->adapter;
    struct zfcp_port *port = erp_action->port;
    struct scsi_device *sdev = erp_action->sdev;

    switch (erp_action->action) {

    case ZFCP_ERP_ACTION_REOPEN_LUN:
        result = zfcp_erp_strategy_check_lun(sdev, result);
        break;

    case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
    case ZFCP_ERP_ACTION_REOPEN_PORT:
        result = zfcp_erp_strategy_check_port(port, result);
        break;

    case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
        result = zfcp_erp_strategy_check_adapter(adapter, result);
        break;
    }
    return result;
}