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 <tobias.biehl@wago.com>
This commit is contained in:
Tobias Biehl
2025-09-22 14:34:58 +02:00
parent 036df4d172
commit ab8cffd8cf
-3
View File
@@ -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.
*/