mboxd: Broadcast the daemon is ready on all transports

The code as it stood only sent the state update at startup on the active
transport, which is somewhat arbitrarily chosen as an implementation
detail of the mbox initialisation function.

If the host firmware is using IPMI, it will not learn of the update
unless it attempts to contact mboxd, which it won't do if it knows the
daemon isn't there, which it may have learned of by receiving a state
update from the daemon's shutdown path. In this circumstance the host
firmware is now stuck.

Relieve the host firmware of this problem by always sending the daemon
state on all supported transports. To avoid some insanity we introduce a
new callback in struct transport_ops that allows use to send the BMC's
entire event state rather than just set or clear updates.

Change-Id: I094ff4089eeebd8be99fbd343b94f7bbef023fb1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/protocol.h b/protocol.h
index 44de89e..2c1e725 100644
--- a/protocol.h
+++ b/protocol.h
@@ -5,6 +5,7 @@
 #define PROTOCOL_H
 
 struct mbox_context;
+struct transport_ops;
 
 /*
  * The GET_MBOX_INFO command is special as it can change the interface based on
@@ -120,6 +121,8 @@
 
 int protocol_negotiate_version(struct mbox_context *context, uint8_t requested);
 
+int protocol_events_put(struct mbox_context *context,
+			const struct transport_ops *ops);
 int protocol_events_set(struct mbox_context *context, uint8_t bmc_event);
 int protocol_events_clear(struct mbox_context *context, uint8_t bmc_event);