From 4a174947083b59cd76561ec0c41f23a95697b822 Mon Sep 17 00:00:00 2001 From: Christoph Pfister Date: Sat, 30 May 2015 13:45:17 +0200 Subject: [PATCH] mem: addr_mapper: restore old address if request not sent Committed by: Nilay Vaish --- src/mem/addr_mapper.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mem/addr_mapper.cc b/src/mem/addr_mapper.cc index 06237745b..2f0020576 100644 --- a/src/mem/addr_mapper.cc +++ b/src/mem/addr_mapper.cc @@ -128,9 +128,13 @@ AddrMapper::recvTimingReq(PacketPtr pkt) // packets) bool successful = masterPort.sendTimingReq(pkt); - // If not successful, restore the sender state - if (!successful && needsResponse) { - delete pkt->popSenderState(); + // If not successful, restore the address and sender state + if (!successful) { + pkt->setAddr(orig_addr); + + if (needsResponse) { + delete pkt->popSenderState(); + } } return successful; -- 2.30.2