/* This function resets the adapter and re-initializes it. This function assumes that all new host commands have been stopped. Return value: SUCCESS / FAILED  */
static int ipr_reset_reload(struct ipr_ioa_cfg *ioa_cfg, enum ipr_shutdown_type shutdown_type)
/* This function resets the adapter and re-initializes it. This function assumes that all new host commands have been stopped. Return value: SUCCESS / FAILED  */
static int ipr_reset_reload(struct ipr_ioa_cfg *ioa_cfg, enum ipr_shutdown_type shutdown_type)
{
	if (!ioa_cfg->in_reset_reload)
		ipr_initiate_ioa_reset(ioa_cfg, shutdown_type);
	spin_unlock_irq(ioa_cfg->host->host_lock);
	wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
	spin_lock_irq(ioa_cfg->host->host_lock);
	if (ioa_cfg->ioa_is_dead) {
		ipr_trace;
		return FAILED;
	}
	return SUCCESS;
}