/* This function returns pointer to next command iocb entry in the command ring. The caller must hold hbalock to prevent other threads consume the next command iocb. SLI-2/SLI-3 provide different sized iocbs.  */
static IOCB_t* lpfc_cmd_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
/* This function returns pointer to next command iocb entry in the command ring. The caller must hold hbalock to prevent other threads consume the next command iocb. SLI-2/SLI-3 provide different sized iocbs.  */
static IOCB_t* lpfc_cmd_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
	return (IOCB_t *) (((char *) pring->cmdringaddr) +
			   pring->cmdidx * phba->iocb_cmd_size);
}