linux/drivers/net/ethernet/qualcomm
Pengpeng Hou b76254c55d net: qualcomm: qca_uart: report the consumed byte on RX skb allocation failure
qca_tty_receive() consumes each input byte before checking whether a
completed frame needs a fresh receive skb. When the current byte completes
a frame, the driver delivers that frame and then allocates a new skb for
the next one.

If that allocation fails, the current code returns i even though data[i]
has already been consumed and may already have completed the delivered
frame. Since serdev interprets the return value as the number of accepted
bytes, this under-reports progress by one byte and can replay the final
byte of the completed frame into a fresh parser state on the next call.

Return i + 1 in that failure path so the accepted-byte count matches the
actual receive-state progress.

Fixes: dfc768fbe6 ("net: qualcomm: add QCA7000 UART driver")
Cc: stable@vger.kernel.org
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260402071207.4036-1-pengpeng@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-03 15:32:56 -07:00
..
emac net: Fix typos 2025-07-25 10:29:07 -07:00
ppe net: ethernet: qualcomm: Add PPE debugfs support for PPE counters 2025-08-21 12:38:42 +02:00
rmnet Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig net: ethernet: qualcomm: QCOM_PPE should depend on ARCH_QCOM 2025-09-01 12:53:38 -07:00
Makefile net: ethernet: qualcomm: Add PPE driver for IPQ9574 SoC 2025-08-21 12:38:41 +02:00
qca_7k_common.c qca_7k: Replace old mail address 2024-01-31 13:38:51 +00:00
qca_7k_common.h qca_7k: Replace BSD boilerplate with SPDX 2024-01-31 13:38:51 +00:00
qca_7k.c qca_7k: Replace BSD boilerplate with SPDX 2024-01-31 13:38:51 +00:00
qca_7k.h qca_7k: Replace BSD boilerplate with SPDX 2024-01-31 13:38:51 +00:00
qca_debug.c qca_spi: Improve reset mechanism 2024-10-09 18:00:27 -07:00
qca_debug.h qca_7k: Replace BSD boilerplate with SPDX 2024-01-31 13:38:51 +00:00
qca_spi.c qca_spi: Make driver probing reliable 2024-12-09 18:26:48 -08:00
qca_spi.h qca_spi: Fix clock speed for multiple QCA7000 2024-12-09 18:26:48 -08:00
qca_uart.c net: qualcomm: qca_uart: report the consumed byte on RX skb allocation failure 2026-04-03 15:32:56 -07:00