/* Return value: 0 on success / other on failure  */
static int ibmvfc_wait_while_resetting(struct ibmvfc_host *vhost)
/* Return value: 0 on success / other on failure  */
static int ibmvfc_wait_while_resetting(struct ibmvfc_host *vhost)
{
	long timeout = wait_event_timeout(vhost->init_wait_q,
					  ((vhost->state == IBMVFC_ACTIVE ||
					    vhost->state == IBMVFC_HOST_OFFLINE ||
					    vhost->state == IBMVFC_LINK_DEAD) &&
					   vhost->action == IBMVFC_HOST_ACTION_NONE),
					  (init_timeout * HZ));
	return timeout ? 0 : -EIO;
}