/* Returns: Pointer to next entry in queue / NULL if empty  */
static struct ibmvfc_crq* ibmvfc_next_crq(struct ibmvfc_host *vhost)
/* Returns: Pointer to next entry in queue / NULL if empty  */
static struct ibmvfc_crq* ibmvfc_next_crq(struct ibmvfc_host *vhost)
{
	struct ibmvfc_crq_queue *queue = &vhost->crq;
	struct ibmvfc_crq *crq;
	crq = &queue->msgs[queue->cur];
	if (crq->valid & 0x80) {
		if (++queue->cur == queue->size)
			queue->cur = 0;
	} else
		crq = NULL;
	return crq;
}