core: Define return value behaviours for binding Tx callbacks

Binding Tx callbacks must return 0 upon success or a negative error code
on failure. Some error codes invoke specific error handling behaviours.
If a binding Tx callback returns the following negative error codes:

1. EMSGSIZE: The packet whose transmission failed is dequeued from the
   transmit queue and dropped, as it will never be successfully
   transmitted

2. EBUSY: The packet whose transmission failed remains queued for a
   subsequent attempt.

This prevents Tx queue stalls for bindings such as astlpc where
reinitialisation can renegotiate the Tx buffer size to a lower value
than the size of packets already in the Tx queue. Previously the
implementation in core failed to discard the packet from the binding Tx
queue if transmission of the head packet was not possible.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7dde22bd7340f2c028adf5112d7d4ab78cac66a6
diff --git a/serial.c b/serial.c
index 5e37507..35c4a02 100644
--- a/serial.c
+++ b/serial.c
@@ -154,7 +154,7 @@
 
 	len = mctp_serial_pkt_escape(pkt, NULL);
 	if (len + sizeof(*hdr) + sizeof(*tlr) > sizeof(serial->txbuf))
-		return -1;
+		return -EMSGSIZE;
 
 	mctp_serial_pkt_escape(pkt, buf);