mem: addr_mapper: restore old address if request not sent
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
parent
31825bd988
commit
4a17494708
1 changed files with 7 additions and 3 deletions
|
@ -128,9 +128,13 @@ AddrMapper::recvTimingReq(PacketPtr pkt)
|
||||||
// packets)
|
// packets)
|
||||||
bool successful = masterPort.sendTimingReq(pkt);
|
bool successful = masterPort.sendTimingReq(pkt);
|
||||||
|
|
||||||
// If not successful, restore the sender state
|
// If not successful, restore the address and sender state
|
||||||
if (!successful && needsResponse) {
|
if (!successful) {
|
||||||
delete pkt->popSenderState();
|
pkt->setAddr(orig_addr);
|
||||||
|
|
||||||
|
if (needsResponse) {
|
||||||
|
delete pkt->popSenderState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return successful;
|
return successful;
|
||||||
|
|
Loading…
Reference in a new issue