tty: n_smux: Add flow control state to overflow message
To aid in debugging, print the state of receive flow control if an
overflow condition occurs.
Change-Id: Ic425d8c3f58e22a99b746bc184a8bb62677a944e
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/drivers/tty/n_smux.c b/drivers/tty/n_smux.c
index b223a91..125b21a 100644
--- a/drivers/tty/n_smux.c
+++ b/drivers/tty/n_smux.c
@@ -84,6 +84,11 @@
IPC_LOG_STR(x); \
} while (0)
+#define SMUX_ERR(x...) do { \
+ pr_err(x); \
+ IPC_LOG_STR(x); \
+} while (0)
+
#define SMUX_PWR(x...) do { \
if (smux_debug_mask & MSM_SMUX_POWER_INFO) \
IPC_LOG_STR(x); \
@@ -1489,8 +1494,9 @@
}
if ((ch->rx_retry_queue_cnt + 1) > SMUX_RX_RETRY_MAX_PKTS) {
/* retry queue full */
- pr_err("%s: ch %d RX retry queue full\n",
- __func__, lcid);
+ SMUX_ERR(
+ "%s: ch %d RX retry queue full; rx flow=%d\n",
+ __func__, lcid, ch->rx_flow_control_auto);
schedule_notify(lcid, SMUX_READ_FAIL, NULL);
ret = -ENOMEM;
spin_unlock_irqrestore(&ch->state_lock_lhb1, flags);