/* beiscsi_get_cid - Allocate a cid @phba: The phba instance  */
static int beiscsi_get_cid(struct beiscsi_hba *phba)
/* beiscsi_get_cid - Allocate a cid @phba: The phba instance  */
static int beiscsi_get_cid(struct beiscsi_hba *phba)
{
	unsigned short cid = 0xFFFF;
	if (!phba->avlbl_cids)
		return cid;
	cid = phba->cid_array[phba->cid_alloc++];
	if (phba->cid_alloc == phba->params.cxns_per_ctrl)
		phba->cid_alloc = 0;
	phba->avlbl_cids--;
	return cid;
}