/* This routine is invoked to reset a hba device. It brings the HBA offline, performs a board restart, and then brings the board back online. The lpfc_offline calls lpfc_sli_hba_down which will clean up on outstanding mailbox commands.  */
void lpfc_reset_hba(struct lpfc_hba *phba)
/* This routine is invoked to reset a hba device. It brings the HBA offline, performs a board restart, and then brings the board back online. The lpfc_offline calls lpfc_sli_hba_down which will clean up on outstanding mailbox commands.  */
void lpfc_reset_hba(struct lpfc_hba *phba)
{
	if (!phba->cfg_enable_hba_reset) {
		phba->link_state = LPFC_HBA_ERROR;
		return;
	}
	lpfc_offline_prep(phba);
	lpfc_offline(phba);
	lpfc_sli_brdrestart(phba);
	lpfc_online(phba);
	lpfc_unblock_mgmt_io(phba);
}