Merge pull request #4405 from gudnimg/mmu-response-fix
MMU: always wait for a request's expected response
This commit is contained in:
commit
45d70b195d
|
|
@ -809,14 +809,11 @@ StepStatus ProtocolLogic::Step() {
|
||||||
// We are ok, switching to Idle if there is no potential next request planned.
|
// We are ok, switching to Idle if there is no potential next request planned.
|
||||||
// But the trouble is we must report a finished command if the previous command has just been finished
|
// But the trouble is we must report a finished command if the previous command has just been finished
|
||||||
// i.e. only try to find some planned command if we just finished the Idle cycle
|
// i.e. only try to find some planned command if we just finished the Idle cycle
|
||||||
bool previousCommandFinished = currentScope == Scope::Command; // @@TODO this is a nasty hack :(
|
|
||||||
if (!ActivatePlannedRequest()) { // if nothing is planned, switch to Idle
|
if (!ActivatePlannedRequest()) { // if nothing is planned, switch to Idle
|
||||||
SwitchToIdle();
|
SwitchToIdle();
|
||||||
} else {
|
} else if (ExpectsResponse()) {
|
||||||
// if the previous cycle was Idle and now we have planned a new command -> avoid returning Finished
|
// if the previous cycle was Idle and now we have planned a new command -> avoid returning Finished
|
||||||
if (!previousCommandFinished && currentScope == Scope::Command) {
|
currentStatus = Processing;
|
||||||
currentStatus = Processing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case CommandRejected:
|
case CommandRejected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue