From: Christoph Pfister Date: Sat, 30 May 2015 11:45:17 +0000 (+0200) Subject: mem: addr_mapper: restore old address if request not sent X-Git-Tag: stable_2015_09_03~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a174947083b59cd76561ec0c41f23a95697b822;p=gem5.git mem: addr_mapper: restore old address if request not sent Committed by: Nilay Vaish --- 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;