mmu: always wait for a request's expected response
If a planned request is activated when the current status is finished then the firmware must wait for the response when the request is expecting it An example is a register read or a register write. manage_response not return unless the register has been read or written. And we must see the response to know if an error should be reported. Step to reproduce issue: 1. Fail selector homing 2. Select 'Tune' item 3. Observe issue. In this situation you can see the value for the previous register read is shown. Which is 0. This very timing dependent and does not always happen. 4. Repeat step 2 until the issue appears. It may take a few times.
This commit is contained in:
parent
3c64874e20
commit
c384524877
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue