From 25a479d5e6ee10509900b4f065754c78cd0f4872 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 14 Apr 2026 21:16:11 +0200 Subject: [PATCH] cpukit/dev/can: correct round-robin on same priority Tx When the device is open multiple times and data are sent to driver by multiple FIFOs/edges then round-robin between same priority prevents one application blocking whole bandwidth. The problem has been introduced during switch from original uLUt/LinCAN to NewLib provided TAILQ Signed-off-by: Pavel Pisa --- cpukit/dev/can/can-queue.c | 2 +- cpukit/include/dev/can/can-impl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/dev/can/can-queue.c b/cpukit/dev/can/can-queue.c index 07c4e38e1f..5607f685a9 100644 --- a/cpukit/dev/can/can-queue.c +++ b/cpukit/dev/can/can-queue.c @@ -391,7 +391,7 @@ int rtems_can_queue_test_outslot( TAILQ_REMOVE( edge->peershead, edge, activepeers ); } if ( out_ready ) { - TAILQ_INSERT_HEAD( + TAILQ_INSERT_TAIL( &qends->active[ edge->edge_prio ], edge, activepeers diff --git a/cpukit/include/dev/can/can-impl.h b/cpukit/include/dev/can/can-impl.h index 6a1146f88d..13abcb3541 100644 --- a/cpukit/include/dev/can/can-impl.h +++ b/cpukit/include/dev/can/can-impl.h @@ -535,7 +535,7 @@ static inline void rtems_can_queue_activate_edge( TAILQ_REMOVE( qedge->peershead, qedge, activepeers ); } - TAILQ_INSERT_HEAD( + TAILQ_INSERT_TAIL( &output_ends->active[ qedge->edge_prio ], qedge, activepeers