From c62fe43ba9134e62932105313a42d43589c413f8 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 9 Nov 2015 13:44:04 +0000 Subject: dev: Don't access the platform directly in PCI devices Cleanup PCI devices to avoid using the PciDevice::platform pointer directly. The PCI-specific functionality provided by the Platform should be accessed through the wrappers in PciDevice. --- src/dev/sinic.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/dev/sinic.cc') diff --git a/src/dev/sinic.cc b/src/dev/sinic.cc index e2b9e28fb..18642efb7 100644 --- a/src/dev/sinic.cc +++ b/src/dev/sinic.cc @@ -871,8 +871,7 @@ Device::rxKick() if (dmaPending() || drainState() != DrainState::Running) goto exit; - rxDmaAddr = params()->platform->pciToDma( - Regs::get_RxData_Addr(vnic->RxData)); + rxDmaAddr = pciToDma(Regs::get_RxData_Addr(vnic->RxData)); rxDmaLen = min(Regs::get_RxData_Len(vnic->RxData), vnic->rxPacketBytes); @@ -1071,8 +1070,7 @@ Device::txKick() if (dmaPending() || drainState() != DrainState::Running) goto exit; - txDmaAddr = params()->platform->pciToDma( - Regs::get_TxData_Addr(vnic->TxData)); + txDmaAddr = pciToDma(Regs::get_TxData_Addr(vnic->TxData)); txDmaLen = Regs::get_TxData_Len(vnic->TxData); txDmaData = txPacket->data + txPacketOffset; txState = txCopy; -- cgit v1.2.3