int pcn_ddi_resume(dev_info_t *dip) { pcn_t *pcnp; if ((pcnp = ddi_get_soft_state(pcn_ssp, ddi_get_instance(dip))) == NULL) return (DDI_FAILURE); mutex_enter(&pcnp->pcn_intrlock); mutex_enter(&pcnp->pcn_xmtlock); pcnp->pcn_flags &= ~PCN_SUSPENDED; if (!pcn_initialize(pcnp, B_FALSE)) { pcn_error(pcnp->pcn_dip, "unable to resume chip"); pcnp->pcn_flags |= PCN_SUSPENDED; mutex_exit(&pcnp->pcn_intrlock); mutex_exit(&pcnp->pcn_xmtlock); return (DDI_SUCCESS); } if (IS_RUNNING(pcnp)) pcn_startall(pcnp); mutex_exit(&pcnp->pcn_xmtlock); mutex_exit(&pcnp->pcn_intrlock); mii_resume(pcnp->pcn_mii); return (DDI_SUCCESS); }
int efe_resume(efe_t *efep) { mutex_enter(&efep->efe_intrlock); mutex_enter(&efep->efe_txlock); if (efep->efe_flags & FLAG_RUNNING) { efe_start(efep); } efep->efe_flags &= ~FLAG_SUSPENDED; mutex_exit(&efep->efe_txlock); mutex_exit(&efep->efe_intrlock); mii_resume(efep->efe_miih); return (DDI_SUCCESS); }