Re: [PATCH v4 1/3] can: rockchip_canfd: prevent TX stall on echo skb failure

From: Marc Kleine-Budde

Date: Fri Jul 31 2026 - 04:23:55 EST


On 30.07.2026 23:50:41, 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.

Have you seen sashiko's reply to patch #3?

>> Should the driver only write to the hardware registers after
>> can_put_echo_skb() succeeds?

I think it's better to call the can_put_echo_skb() after the
"if (!netif_subqueue_maybe_stop())"

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