summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-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 c644308b6..1a118812c 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");
+ }
}
}
@@ -198,7 +202,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 {