From 36204e790db744dc41c19636facce09c50257466 Mon Sep 17 00:00:00 2001 From: norly Date: Mon, 6 Jun 2022 13:39:00 +0200 Subject: [PATCH] On RX buffer overflow, printk remaining input size If can327_ldisc_rx() is called with a large 'count' because the UART driver feeds us huge buffers, then the user should have a chance to know and report this. In this case, we'll have to increase ELM327_SIZE_RXBUF. --- module/can327.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/can327.c b/module/can327.c index fc99dea..da81fa3 100644 --- a/module/can327.c +++ b/module/can327.c @@ -993,7 +993,7 @@ static void can327_ldisc_rx(struct tty_struct *tty, } if (count >= 0) { - netdev_err(elm->dev, "Receive buffer overflowed. Bad chip or wiring?"); + netdev_err(elm->dev, "Receive buffer overflowed. Bad chip or wiring? count = %i", count); elm327_uart_side_failure(elm); -- 2.30.2