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.c b/protocol.c
index 616af3d..8eb06ae 100644
--- a/protocol.c
+++ b/protocol.c
@@ -23,7 +23,23 @@
 }
 
 /*
- * protocol_events_set() - Set BMC events
+ * protocol_events_put() - Push the full set/cleared state of BMC events on the
+ * 			   provided transport
+ * @context:    The mbox context pointer
+ * @ops:	The operations struct for the transport of interest
+ *
+ * Return:      0 on success otherwise negative error code
+ */
+int protocol_events_put(struct mbox_context *context,
+			const struct transport_ops *ops)
+{
+	const uint8_t mask = protocol_get_bmc_event_mask(context);
+
+	return ops->put_events(context, mask);
+}
+
+/*
+ * protocol_events_set() - Update the set BMC events on the active transport
  * @context:	The mbox context pointer
  * @bmc_event:	The bits to set
  *
@@ -44,7 +60,8 @@
 }
 
 /*
- * protocol_events_clear() - Clear BMC events
+ * protocol_events_clear() - Update the cleared BMC events on the active
+ *                           transport
  * @context:	The mbox context pointer
  * @bmc_event:	The bits to clear
  *