summaryrefslogtreecommitdiff
path: root/src/dev/copy_engine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/copy_engine.cc')
-rw-r--r--src/dev/copy_engine.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/dev/copy_engine.cc b/src/dev/copy_engine.cc
index 7b17a86a3..809649718 100644
--- a/src/dev/copy_engine.cc
+++ b/src/dev/copy_engine.cc
@@ -110,21 +110,26 @@ CopyEngine::CopyEngineChannel::~CopyEngineChannel()
delete [] copyBuffer;
}
-Port *
-CopyEngine::getPort(const std::string &if_name, int idx)
+MasterPort &
+CopyEngine::getMasterPort(const std::string &if_name, int idx)
{
- if (if_name == "dma") {
- if (idx < chan.size())
- return chan[idx]->getPort();
+ if (if_name != "dma") {
+ // pass it along to our super class
+ return PciDev::getMasterPort(if_name, idx);
+ } else {
+ if (idx >= static_cast<int>(chan.size())) {
+ panic("CopyEngine::getMasterPort: unknown index %d\n", idx);
+ }
+
+ return chan[idx]->getMasterPort();
}
- return PciDev::getPort(if_name, idx);
}
-Port *
-CopyEngine::CopyEngineChannel::getPort()
+MasterPort &
+CopyEngine::CopyEngineChannel::getMasterPort()
{
- return &cePort;
+ return cePort;
}
void