/* qla4xxx_wait_for_hba_online - waits for HBA to come online @ha: Pointer to host adapter structure  */
static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha)
/* qla4xxx_wait_for_hba_online - waits for HBA to come online @ha: Pointer to host adapter structure  */
static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha)
{
	unsigned long wait_online;
	wait_online = jiffies + (30 * HZ);
	while (time_before(jiffies, wait_online)) {
		if (adapter_up(ha))
			return QLA_SUCCESS;
		else if (ha->retry_reset_ha_cnt == 0)
			return QLA_ERROR;
		msleep(2000);
	}
	return QLA_ERROR;
}