/* This function checks the host status register to check if HBA is ready. This function will wait in a loop for the HBA to be ready If the HBA is not ready , the function will will reset the HBA PCI function again. The function returns 1 when HBA fail to be ready otherwise returns zero.  */
static int lpfc_sli_brdready_s4(struct lpfc_hba *phba, uint32_t mask)
/* This function checks the host status register to check if HBA is ready. This function will wait in a loop for the HBA to be ready If the HBA is not ready , the function will will reset the HBA PCI function again. The function returns 1 when HBA fail to be ready otherwise returns zero.  */
static int lpfc_sli_brdready_s4(struct lpfc_hba *phba, uint32_t mask)
{
	uint32_t status;
	int retval = 0;
	status = lpfc_sli4_post_status_check(phba);
	if (status) {
		phba->pport->port_state = LPFC_VPORT_UNKNOWN;
		lpfc_sli_brdrestart(phba);
		status = lpfc_sli4_post_status_check(phba);
	}
	if (status) {
		phba->link_state = LPFC_HBA_ERROR;
		retval = 1;
	} else
		phba->sli4_hba.intr_enable = 0;
	return retval;
}