/* Returns: 1 if init will be retried / 0 if not  */
static int ibmvfc_retry_host_init(struct ibmvfc_host *vhost)
/* Returns: 1 if init will be retried / 0 if not  */
static int ibmvfc_retry_host_init(struct ibmvfc_host *vhost)
{
	int retry = 0;
	if (vhost->action == IBMVFC_HOST_ACTION_INIT_WAIT) {
		vhost->delay_init = 1;
		if (++vhost->init_retries > IBMVFC_MAX_HOST_INIT_RETRIES) {
			dev_err(vhost->dev,
				"Host initialization retries exceeded. Taking adapter offline\n");
			ibmvfc_link_down(vhost, IBMVFC_HOST_OFFLINE);
		} else if (vhost->init_retries == IBMVFC_MAX_HOST_INIT_RETRIES)
			__ibmvfc_reset_host(vhost);
		else {
			ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT);
			retry = 1;
		}
	}
	wake_up(&vhost->work_wait_q);
	return retry;
}