/* Returns: lpfc_do_offline() return code if not zero -EIO reset not configured or error posting the event zero for success  */
static int lpfc_selective_reset(struct lpfc_hba *phba)
/* Returns: lpfc_do_offline() return code if not zero -EIO reset not configured or error posting the event zero for success  */
static int lpfc_selective_reset(struct lpfc_hba *phba)
{
	struct completion online_compl;
	int status = 0;
	if (!phba->cfg_enable_hba_reset)
		return -EIO;
	status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
	if (status != 0)
		return status;
	init_completion(&online_compl);
	lpfc_workq_post_event(phba, &status, &online_compl,
			      LPFC_EVT_ONLINE);
	wait_for_completion(&online_compl);
	if (status != 0)
		return -EIO;
	return 0;
}