diff options
Diffstat (limited to 'src/dev/sinic.cc')
-rw-r--r-- | src/dev/sinic.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/dev/sinic.cc b/src/dev/sinic.cc index dddda1f1c..40bf29c87 100644 --- a/src/dev/sinic.cc +++ b/src/dev/sinic.cc @@ -921,7 +921,7 @@ Device::rxKick() break; case rxBeginCopy: - if (dmaPending()) + if (dmaPending() || getState() != Running) goto exit; rxDmaAddr = params()->platform->pciToDma( @@ -1109,7 +1109,7 @@ Device::txKick() break; case txBeginCopy: - if (dmaPending()) + if (dmaPending() || getState() != Running) goto exit; txDmaAddr = params()->platform->pciToDma( @@ -1287,6 +1287,18 @@ Device::recvPacket(EthPacketPtr packet) return true; } +void +Device::resume() +{ + SimObject::resume(); + + // During drain we could have left the state machines in a waiting state and + // they wouldn't get out until some other event occured to kick them. + // This way they'll get out immediately + txKick(); + rxKick(); +} + //===================================================================== // // @@ -1627,6 +1639,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Device) Param<uint32_t> pci_dev; Param<uint32_t> pci_func; Param<Tick> pio_latency; + Param<Tick> config_latency; Param<Tick> intr_delay; Param<Tick> clock; @@ -1669,6 +1682,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Device) INIT_PARAM(pci_dev, "PCI device number"), INIT_PARAM(pci_func, "PCI function code"), INIT_PARAM_DFLT(pio_latency, "Programmed IO latency in bus cycles", 1), + INIT_PARAM(config_latency, "Number of cycles for a config read or write"), INIT_PARAM(intr_delay, "Interrupt Delay"), INIT_PARAM(clock, "State machine cycle time"), @@ -1713,6 +1727,7 @@ CREATE_SIM_OBJECT(Device) params->deviceNum = pci_dev; params->functionNum = pci_func; params->pio_delay = pio_latency; + params->config_delay = config_latency; params->intr_delay = intr_delay; params->clock = clock; |