bool GrpAdminSetGetFeatCombo::SaveState() { LOG_NRM("Saving system state using getfeatures before group starts"); // Reset saved value to account for regression mArbitration = 0; mPowerState = 0; mTmpThreshold = 0; mTimeLimErrRec = 0; mVolWrCache = 0; mIrqCoalescing = 0; mWrAtomicity = 0; memset(mIvecConf, 0, sizeof(mIvecConf)); mAsyncEvent = 0; if (gCtrlrConfig->SetState(ST_DISABLE_COMPLETELY) == false) throw FrmwkEx(HERE); SharedACQPtr acq = SharedACQPtr(new ACQ(gDutFd)); acq->Init(5); SharedASQPtr asq = SharedASQPtr(new ASQ(gDutFd)); asq->Init(5); // All queues will use identical IRQ vector IRQ::SetAnySchemeSpecifyNum(1); gCtrlrConfig->SetCSS(CtrlrConfig::CSS_NVM_CMDSET); if (gCtrlrConfig->SetState(ST_ENABLE) == false) throw FrmwkEx(HERE); SaveArbitration(asq, acq); SavePowerState(asq, acq); SaveTMPTH(asq, acq); SaveTLER(asq, acq); if ((gInformative->GetIdentifyCmdCtrlr()->GetValue(IDCTRLRCAP_VWC) & BITMASK_VWC) == 0x1) { SaveVolWrCache(asq, acq); } SaveIRQCoalescing(asq, acq); SaveIvecConf(asq, acq); SaveWrAtomicity(asq, acq); SaveAsyncEvent(asq, acq); return true; }
bool GrpAdminSetGetFeatCombo::SaveState() { LOG_NRM("Saving the current arbitration state before the group starts."); // Reset saved value to account for regression mArbitration = 0; mPowerState = 0; mTmpThreshold = 0; mTimeLimErrRec = 0; mVolWrCache = 0; if (gCtrlrConfig->SetState(ST_DISABLE_COMPLETELY) == false) throw FrmwkEx(HERE); SharedACQPtr acq = SharedACQPtr(new ACQ(gDutFd)); acq->Init(5); SharedASQPtr asq = SharedASQPtr(new ASQ(gDutFd)); asq->Init(5); // All queues will use identical IRQ vector IRQ::SetAnySchemeSpecifyNum(1); gCtrlrConfig->SetCSS(CtrlrConfig::CSS_NVM_CMDSET); if (gCtrlrConfig->SetState(ST_ENABLE) == false) throw FrmwkEx(HERE); SaveArbitration(asq, acq); SavePowerState(asq, acq); SaveTMPTH(asq, acq); SaveTLER(asq, acq); if ((gInformative->GetIdentifyCmdCtrlr()->GetValue(IDCTRLRCAP_VWC) & BITMASK_VWC) == 0x1) { SaveVolWrCache(asq, acq); } return true; }