aboutsummaryrefslogtreecommitdiff
path: root/libflash/ipmi-hiomap.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2019-02-21 16:58:11 +1030
committerStewart Smith <stewart@linux.ibm.com>2019-02-24 17:43:37 -0600
commit403d527269bed128a5a114edc2a8e040fc28fc78 (patch)
tree55a1ca5044226a62bdc198c53ddd6f205787311b /libflash/ipmi-hiomap.h
parent64a61885a2294eacc54d51962781647ab5c58889 (diff)
downloadskiboot-403d527269bed128a5a114edc2a8e040fc28fc78.zip
skiboot-403d527269bed128a5a114edc2a8e040fc28fc78.tar.gz
skiboot-403d527269bed128a5a114edc2a8e040fc28fc78.tar.bz2
libflash/ipmi-hiomap: Overhaul event handling
Reworking the event handling was inspired by a bug report by Vasant where the host would get wedged on multiple flash access attempts in the face of a persistent error state on the BMC-side. The cause of this bug was the early-exit based on ctx->update, which erronously assumed that all events had been completely handled in prior calls to ipmi_hiomap_handle_events(). This is not true if e.g. HIOMAP_E_DAEMON_READY is clear in the prior calls. Regardless, there were other correctness and efficiency problems with the handling strategy: * Ack-able event state was not restored in the face of errors in the process of re-establishing protocol state * It forced needless window restoration with respect to the context in which ipmi_hiomap_handle_events() was called. * Tests for HIOMAP_E_DAEMON_READY and HIOMAP_E_FLASH_LOST were redundant with the overhauled error handling introduced in the previous patch Fix all of the above issues and add comments to explain the event handling flow. Tests for correctness follow later in the series. Cc: stable Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash/ipmi-hiomap.h')
-rw-r--r--libflash/ipmi-hiomap.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/libflash/ipmi-hiomap.h b/libflash/ipmi-hiomap.h
index f60f725..edd4ee0 100644
--- a/libflash/ipmi-hiomap.h
+++ b/libflash/ipmi-hiomap.h
@@ -48,7 +48,6 @@ struct ipmi_hiomap {
* three variables are protected by lock to avoid conflict.
*/
struct lock lock;
- bool update;
uint8_t bmc_state;
enum lpc_window_state window_state;
};