/* This routine is invoked by the ELS timer after timeout. It posts the ELS timer timeout event by setting the WORKER_ELS_TMO bit to the work port event bitmap and then invokes the lpfc_worker_wake_up() routine to wake up the worker thread. It is for the worker thread to invoke the routine lpfc_els_timeout_handler() to work on the posted event WORKER_ELS_TMO.  */
void lpfc_els_timeout(unsigned long ptr)
/* This routine is invoked by the ELS timer after timeout. It posts the ELS timer timeout event by setting the WORKER_ELS_TMO bit to the work port event bitmap and then invokes the lpfc_worker_wake_up() routine to wake up the worker thread. It is for the worker thread to invoke the routine lpfc_els_timeout_handler() to work on the posted event WORKER_ELS_TMO.  */
void lpfc_els_timeout(unsigned long ptr)
{
	struct lpfc_vport *vport = (struct lpfc_vport *) ptr;
	struct lpfc_hba   *phba = vport->phba;
	uint32_t tmo_posted;
	unsigned long iflag;
	spin_lock_irqsave(&vport->work_port_lock, iflag);
	tmo_posted = vport->work_port_events & WORKER_ELS_TMO;
	if (!tmo_posted)
		vport->work_port_events |= WORKER_ELS_TMO;
	spin_unlock_irqrestore(&vport->work_port_lock, iflag);
	if (!tmo_posted)
		lpfc_worker_wake_up(phba);
	return;
}