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

Marc Kleine-Budde <[email protected]> Fri, 31 Jul 2026 10:22:23 +0200
Newsgroups org.kernel.vger.linux-can,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <20260731-important-dingo-of-abracadabra-054a28-mkl@pengutronix.de>
--2bsbsmil5anrrh5q
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: [PATCH v4 1/3] can: rockchip_canfd: prevent TX stall on echo skb
 failure
MIME-Version: 1.0

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

--=20
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung N=C3=BCrnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

--2bsbsmil5anrrh5q
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSl+MghEFFAdY3pYJLMOmT6rpmt0gUCamxbPQAKCRDMOmT6rpmt
0kswAQDlV7wYQ0x9hzeWB3ThJBYu7HS6D0tL/LkyqJEPkxuKuwEAwmQSALVhaYdi
rI0YBtBNnxmZR5iqTe55aydOSmff0Qo=
=tlqy
-----END PGP SIGNATURE-----

--2bsbsmil5anrrh5q--