/* This function is called with a list of IOCBs to cancel. It cancels the IOCB on the list by invoking the complete callback function associated with the IOCB with the provided @ulpstatus and @ulpword4 set to the IOCB commond fields.  */
void lpfc_sli_cancel_iocbs(struct lpfc_hba *phba, struct list_head *iocblist, uint32_t ulpstatus, uint32_t ulpWord4)
/* This function is called with a list of IOCBs to cancel. It cancels the IOCB on the list by invoking the complete callback function associated with the IOCB with the provided @ulpstatus and @ulpword4 set to the IOCB commond fields.  */
void lpfc_sli_cancel_iocbs(struct lpfc_hba *phba, struct list_head *iocblist, uint32_t ulpstatus, uint32_t ulpWord4)
{
	struct lpfc_iocbq *piocb;
	while (!list_empty(iocblist)) {
		list_remove_head(iocblist, piocb, struct lpfc_iocbq, list);
		if (!piocb->iocb_cmpl)
			lpfc_sli_release_iocbq(phba, piocb);
		else {
			piocb->iocb.ulpStatus = ulpstatus;
			piocb->iocb.un.ulpWord[4] = ulpWord4;
			(piocb->iocb_cmpl) (phba, piocb, piocb);
		}
	}
	return;
}