From c3fc675285bc9542262e23c7330581eaf5a24de1 Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Tue, 5 Dec 2017 12:01:06 +1100 Subject: libflash/mbox-flash: Allow mbox-flash to tell the driver msg timeouts Currently when mbox-flash decides that a message times out the driver has no way of knowing to drop the message and will continue waiting for a response indefinitely preventing more messages from ever being sent. This is a problem if the BMC crashes or has some other issue where it won't ever respond to our outstanding message. This patch provides a method for mbox-flash to tell the driver how long it should wait before it no longer needs to care about the response. Signed-off-by: Cyril Bur Signed-off-by: Stewart Smith --- include/lpc-mbox.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/lpc-mbox.h b/include/lpc-mbox.h index c4b1015b..569f1f72 100644 --- a/include/lpc-mbox.h +++ b/include/lpc-mbox.h @@ -63,7 +63,7 @@ struct bmc_mbox_msg { uint8_t bmc; }; -int bmc_mbox_enqueue(struct bmc_mbox_msg *msg); +int bmc_mbox_enqueue(struct bmc_mbox_msg *msg, unsigned int timeout_sec); int bmc_mbox_register_callback(void (*callback)(struct bmc_mbox_msg *msg, void *priv), void *drv_data); int bmc_mbox_register_attn(void (*callback)(uint8_t bits, void *priv), -- cgit v1.2.1