8f943dd1 | 07-Mar-2023 |
Conor Dooley <conor.dooley@microchip.com> |
soc: microchip: mpfs: handle timeouts and failed services differently
The system controller will only deliver an interrupt if a service succeeds. This leaves us in the unfortunate position with curr
soc: microchip: mpfs: handle timeouts and failed services differently
The system controller will only deliver an interrupt if a service succeeds. This leaves us in the unfortunate position with current code where there is no way to differentiate between a legitimate timeout where the service has not completed & where it has completed, but failed.
mbox_send_message() has its own completion, and it will time out of the system controller does not lower the busy flag. In this case, a timeout has occurred and the error can be propagated back to the caller.
If the busy flag is lowered, but no interrupt has arrived to trigger the rx callback, the service can be deemed to have failed. Report -EBADMSG in this case so that callers can differentiate.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
show more ...
|
7606f4df | 07-Mar-2023 |
Conor Dooley <conor.dooley@microchip.com> |
soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
The error handling has a kinda weird nested-if setup that is not really adding anything. Switch it to more of an early re
soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()
The error handling has a kinda weird nested-if setup that is not really adding anything. Switch it to more of an early return arrangement as a predatory step for adding different handing for timeouts and failed services.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
show more ...
|
4f739af1 | 07-Mar-2023 |
Conor Dooley <conor.dooley@microchip.com> |
soc: microchip: mpfs: use a consistent completion timeout
Completion timeouts use jiffies, so passing a number directly will produce inconsistent timeouts depending on config. Define the timeout in
soc: microchip: mpfs: use a consistent completion timeout
Completion timeouts use jiffies, so passing a number directly will produce inconsistent timeouts depending on config. Define the timeout in ms and convert it to jiffies instead.
Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
show more ...
|