Re: [PATCH v3 1/3] can: rockchip_canfd: prevent TX stall on echo skb failure
From: Marc Kleine-Budde
Date: Thu Jul 30 2026 - 10:03:32 EST
On 30.07.2026 21:48:38, Cunhao Lu wrote:
> rkcanfd_start_xmit() advances tx_head and requests transmission even when
> can_put_echo_skb() fails. This creates a pending TX entry without the echo
> skb that the RXSTX completion path needs to match the self-received frame.
> The entry cannot be completed, and the netdev TX queue can remain stopped
> after the two-entry software FIFO fills.
>
> Do not advance tx_head or request transmission if the echo skb cannot be
> installed, and account the frame as dropped. Make can_put_echo_skb()
> consume the skb on its remaining -EINVAL error path so that callers have
> consistent skb ownership after an error.
>
> Fixes: b6661d73290c ("can: rockchip_canfd: add TX PATH")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Cunhao Lu <1579567540@xxxxxx>
>
> ---
> Changes in v3:
> - Move the -EINVAL skb free into can_put_echo_skb().
> - Drop the redundant error message from rkcanfd_start_xmit().
> ---
> drivers/net/can/dev/skb.c | 1 +
> drivers/net/can/rockchip/rockchip_canfd-tx.c | 7 +++++--
Please split this and send drivers/net/can/dev/skb.c as a stand alone
patch outside of this series.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature