/* This routine is invoked by the worker thread to process all the pending SLI4 els abort xri events.  */
void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba)
/* This routine is invoked by the worker thread to process all the pending SLI4 els abort xri events.  */
void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba)
{
	struct lpfc_cq_event *cq_event;
	spin_lock_irq(&phba->hbalock);
	phba->hba_flag &= ~ELS_XRI_ABORT_EVENT;
	spin_unlock_irq(&phba->hbalock);
	while (!list_empty(&phba->sli4_hba.sp_els_xri_aborted_work_queue)) {
		spin_lock_irq(&phba->hbalock);
		list_remove_head(&phba->sli4_hba.sp_els_xri_aborted_work_queue,
				 cq_event, struct lpfc_cq_event, list);
		spin_unlock_irq(&phba->hbalock);
		lpfc_sli4_els_xri_aborted(phba, &cq_event->cqe.wcqe_axri);
		lpfc_sli4_cq_event_release(phba, cq_event);
	}
}