Merge pull request #4405 from gudnimg/mmu-response-fix

MMU: always wait for a request's expected response
This commit is contained in:
3d-gussner 2023-12-22 16:34:27 +01:00 committed by GitHub
commit 45d70b195d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -809,14 +809,11 @@ StepStatus ProtocolLogic::Step() {
// 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
// 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
SwitchToIdle();
} else {
} else if (ExpectsResponse()) {
// 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;
case CommandRejected: