/* Returns sglq ponter = success, NULL = Failure.  */
static struct lpfc_sglq* __lpfc_clear_active_sglq(struct lpfc_hba *phba, uint16_t xritag)
/* Returns sglq ponter = success, NULL = Failure.  */
static struct lpfc_sglq* __lpfc_clear_active_sglq(struct lpfc_hba *phba, uint16_t xritag)
{
	uint16_t adj_xri;
	struct lpfc_sglq *sglq;
	adj_xri = xritag - phba->sli4_hba.max_cfg_param.xri_base;
	if (adj_xri > phba->sli4_hba.max_cfg_param.max_xri)
		return NULL;
	sglq = phba->sli4_hba.lpfc_sglq_active_list[adj_xri];
	phba->sli4_hba.lpfc_sglq_active_list[adj_xri] = NULL;
	return sglq;
}