File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,14 @@ void CrorcBar::configure(bool /*force*/)
129129 log (" CRORC configuration done" , LogInfoOps);
130130}
131131
132- Crorc::ReportInfo CrorcBar::report ()
132+ Crorc::ReportInfo CrorcBar::report (bool forConfig )
133133{
134134 std::map<int , Crorc::Link> linkMap = initializeLinkMap ();
135135
136136 // strip down link map, depending on link(s) requested to report on
137137 // "associative-container erase idiom"
138- for (auto it = linkMap.cbegin (); it != linkMap.cend (); /* no increment */ ) {
138+ // don't remove links for config, as they all need to be reported
139+ for (auto it = linkMap.cbegin (); it != linkMap.cend () && !forConfig; /* no increment */ ) {
139140 if ((mLinkMask .find (it->first ) == mLinkMask .end ())) {
140141 linkMap.erase (it++);
141142 } else {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class CrorcBar final : public BarInterfaceBase
4949 void setSerial (int serial);
5050
5151 void configure (bool force = false ) override ;
52- Crorc::ReportInfo report ();
52+ Crorc::ReportInfo report (bool forConfig = false );
5353
5454 void resetDevice (bool withSiu);
5555 void flushSuperpages ();
Original file line number Diff line number Diff line change @@ -455,13 +455,14 @@ FirmwareFeatures CruBar::convertToFirmwareFeatures(uint32_t reg)
455455}
456456
457457// / Reports the CRU status
458- Cru::ReportInfo CruBar::report ()
458+ Cru::ReportInfo CruBar::report (bool forConfig )
459459{
460460 std::map<int , Link> linkMap = initializeLinkMap ();
461461
462462 // strip down link map, depending on link(s) requested to report on
463463 // "associative-container erase idiom"
464- for (auto it = linkMap.cbegin (); it != linkMap.cend (); /* no increment */ ) {
464+ // don't remove links for config, as they all need to be reported
465+ for (auto it = linkMap.cbegin (); it != linkMap.cend () && !forConfig; /* no increment */ ) {
465466 if ((mLinkMask .find (it->first ) == mLinkMask .end ())) {
466467 linkMap.erase (it++);
467468 } else {
@@ -661,7 +662,7 @@ void CruBar::checkConfigParameters()
661662void CruBar::configure (bool force)
662663{
663664 // Get current info
664- Cru::ReportInfo reportInfo = report ();
665+ Cru::ReportInfo reportInfo = report (true );
665666 populateLinkMap (mLinkMap );
666667
667668 if (static_cast <uint32_t >(mClock ) == reportInfo.ttcClock &&
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ class CruBar final : public BarInterfaceBase
8080 void resetInternalCounters ();
8181 void setWrapperCount ();
8282 void configure (bool force = false ) override ;
83- Cru::ReportInfo report ();
83+ Cru::ReportInfo report (bool forConfig = false );
8484 Cru::PacketMonitoringInfo monitorPackets ();
8585 Cru::TriggerMonitoringInfo monitorTriggers (bool updateable = false );
8686 void emulateCtp (Cru::CtpInfo);
You can’t perform that action at this time.
0 commit comments