/* Returns: 1 if host can accept command / 0 if not  */
static int ibmvfc_host_chkready(struct ibmvfc_host *vhost)
/* Returns: 1 if host can accept command / 0 if not  */
static int ibmvfc_host_chkready(struct ibmvfc_host *vhost)
{
	int result = 0;
	switch (vhost->state) {
	case IBMVFC_LINK_DEAD:
	case IBMVFC_HOST_OFFLINE:
		result = DID_NO_CONNECT << 16;
		break;
	case IBMVFC_NO_CRQ:
	case IBMVFC_INITIALIZING:
	case IBMVFC_HALTED:
	case IBMVFC_LINK_DOWN:
		result = DID_REQUEUE << 16;
		break;
	case IBMVFC_ACTIVE:
		result = 0;
		break;
	};
	return result;
}