summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dev/io_device.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index 563fdb759..adf41799c 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -143,15 +143,19 @@ void
DmaPort::recvRetry()
{
Packet* pkt = transmitList.front();
- DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n",
- pkt, pkt->senderState);
- if (sendTiming(pkt)) {
- DPRINTF(DMA, "-- Done\n");
- transmitList.pop_front();
- pendingCount--;
- assert(pendingCount >= 0);
- } else {
- DPRINTF(DMA, "-- Failed, queued\n");
+ bool result = true;
+ while (result && transmitList.size()) {
+ DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n",
+ pkt, pkt->senderState);
+ result = sendTiming(pkt);
+ if (result) {
+ DPRINTF(DMA, "-- Done\n");
+ transmitList.pop_front();
+ pendingCount--;
+ assert(pendingCount >= 0);
+ } else {
+ DPRINTF(DMA, "-- Failed, queued\n");
+ }
}
}
@@ -201,7 +205,7 @@ DmaPort::sendDma(Packet *pkt)
if (state == Timing) { */
DPRINTF(DMA, "Attempting to send Packet %#x with senderState: %#x\n",
pkt, pkt->senderState);
- if (!sendTiming(pkt)) {
+ if (transmitList.size() || !sendTiming(pkt)) {
transmitList.push_back(pkt);
DPRINTF(DMA, "-- Failed: queued\n");
} else {