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