Skip to content

Commit 83f1718

Browse files
committed
[pcidevice] Fix bug which only allows bars 0 and 2
1 parent 15d1a84 commit 83f1718

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/RocPciDevice.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "ReadoutCard/ChannelFactory.h"
2929
#include "ReadoutCard/Exception.h"
3030
#include "ReadoutCard/Parameters.h"
31-
#include "Utilities/SmartPointer.h"
3231

3332
namespace AliceO2
3433
{

src/RocPciDevice.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "ReadoutCard/ParameterTypes/PciAddress.h"
2727
#include "ReadoutCard/ParameterTypes/SerialId.h"
2828
#include "ReadoutCard/PciId.h"
29+
#include "Utilities/SmartPointer.h"
2930

3031
namespace AliceO2
3132
{
@@ -76,6 +77,10 @@ class RocPciDevice
7677
return std::move(mPdaBar0);
7778
} else if (barIndex == 2) {
7879
return std::move(mPdaBar2);
80+
} else if (barIndex > 0 && barIndex < 6) {
81+
std::shared_ptr<Pda::PdaBar> mPdaBarX;
82+
Utilities::resetSmartPtr(mPdaBarX, mPciDevice, barIndex);
83+
return std::move(mPdaBarX);
7984
}
8085
return nullptr;
8186
}

0 commit comments

Comments
 (0)