diff options
author | Conor Dooley <conor.dooley@microchip.com> | 2024-10-16 19:35:06 +0300 |
---|---|---|
committer | Conor Dooley <conor.dooley@microchip.com> | 2024-10-17 19:13:30 +0300 |
commit | 83beece5aff75879bdfc6df8ba84ea88fd93050e (patch) | |
tree | d1f5167ae8e046869285d7a1cce37a71cd2387f7 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 8e929cb546ee42c9a61d24fae60605e9e3192354 (diff) | |
download | linux-83beece5aff75879bdfc6df8ba84ea88fd93050e.tar.xz |
firmware: microchip: auto-update: fix poll_complete() to not report spurious timeout errors
fw_upload's poll_complete() is really intended for use with
asynchronous write() implementations - or at least those where the
write() loop may terminate without the kernel yet being aware of whether
or not the firmware upload has succeeded. For auto-update, write() is
only ever called once and will only return when uploading has completed,
be that by passing or failing. The core fw_upload code only calls
poll_complete() after the final call to write() has returned.
However, the poll_complete() implementation in the auto-update driver
was written to expect poll_complete() to be called from another context,
and it waits for a completion signalled from write(). Since
poll_complete() is actually called from the same context, after the
write() loop has terminated, wait_for_completion() never sees the
completion get signalled and always times out, causing programming to
always report a failing.
Since write() is full synchronous, and its return value will indicate
whether or not programming passed or failed, poll_complete() serves no
purpose and can be cut down to simply return FW_UPLOAD_ERR_NONE.
Cc: stable@vger.kernel.org
Fixes: ec5b0f1193ad4 ("firmware: microchip: add PolarFire SoC Auto Update support")
Reported-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Tested-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions