Example #1
0
void zfcp_scsi_schedule_rports_block(struct zfcp_adapter *adapter)
{
	unsigned long flags;
	struct zfcp_port *port;

	read_lock_irqsave(&adapter->port_list_lock, flags);
	list_for_each_entry(port, &adapter->port_list, list)
		zfcp_scsi_schedule_rport_block(port);
	read_unlock_irqrestore(&adapter->port_list_lock, flags);
}
Example #2
0
static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port,
					 int clear, char *id, void *ref)
{
	zfcp_erp_port_block(port, clear);
	zfcp_scsi_schedule_rport_block(port);

	if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_ERP_FAILED)
		return;

	zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT_FORCED,
				port->adapter, port, NULL, id, ref);
}
Example #3
0
static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id)
{
    zfcp_erp_port_block(port, clear);
    zfcp_scsi_schedule_rport_block(port);

    if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_ERP_FAILED) {

        zfcp_erp_set_port_status(port, ZFCP_STATUS_COMMON_ERP_FAILED);
        return -EIO;
    }

    return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT,
                                   port->adapter, port, NULL, id, 0);
}
Example #4
0
static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id,
				 void *ref)
{
	zfcp_erp_port_block(port, clear);
	zfcp_scsi_schedule_rport_block(port);

	if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_ERP_FAILED) {
		/* ensure propagation of failed status to new devices */
		zfcp_erp_port_failed(port, "erpreo1", NULL);
		return -EIO;
	}

	return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT,
				       port->adapter, port, NULL, id, ref);
}