From ab8cffd8cf9f360c7e8dfdd614224c3486f5efc5 Mon Sep 17 00:00:00 2001 From: Tobias Biehl Date: Mon, 22 Sep 2025 14:34:58 +0200 Subject: [PATCH] can: c_can: fix "BUG! echo_skb is occupied!" The optimization regarding caching of TX messages for C_CAN/D_CAN IP cores can result in occupied echo_skbs, when using specific socket options. The relevant changes were reverted, but some code changes were sill missing, which resulted in the bug above. Signed-off-by: Tobias Biehl --- drivers/net/can/c_can/c_can.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h index 029cd8194ed5..82ff5c87f8eb 100755 --- a/drivers/net/can/c_can/c_can.h +++ b/drivers/net/can/c_can/c_can.h @@ -241,9 +241,6 @@ static inline u8 c_can_get_tx_free(const struct c_can_priv *priv, u8 head = c_can_get_tx_head(ring); u8 tail = c_can_get_tx_tail(ring); - if (priv->type == BOSCH_D_CAN) - return ring->obj_num - (ring->head - ring->tail); - /* This is not a FIFO. C/D_CAN sends out the buffers * prioritized. The lowest buffer number wins. */