/* When HBQ is enabled, buffers are searched based on tags. This function allocates a tag for buffer posted using CMD_QUE_XRI64_CX iocb. The tag is bit wise or-ed with QUE_BUFTAG_BIT to make sure that the tag does not conflict with tags of buffer posted for unsolicited events. The function returns the allocated tag. The function is called with no locks held.  */
uint32_t lpfc_sli_get_buffer_tag(struct lpfc_hba *phba)
/* When HBQ is enabled, buffers are searched based on tags. This function allocates a tag for buffer posted using CMD_QUE_XRI64_CX iocb. The tag is bit wise or-ed with QUE_BUFTAG_BIT to make sure that the tag does not conflict with tags of buffer posted for unsolicited events. The function returns the allocated tag. The function is called with no locks held.  */
uint32_t lpfc_sli_get_buffer_tag(struct lpfc_hba *phba)
{
	spin_lock_irq(&phba->hbalock);
	phba->buffer_tag_count++;
	phba->buffer_tag_count |= QUE_BUFTAG_BIT;
	spin_unlock_irq(&phba->hbalock);
	return phba->buffer_tag_count;
}