Skip to content

Commit 63b9e0f

Browse files
grandwolfgregkh
authored andcommitted
can: at91_can: RX queue could get stuck at high bus load
commit 43200a4480cbbe660309621817f54cbb93907108 upstream. At high bus load it could happen that "at91_poll()" enters with all RX message boxes filled up. If then at the end the "quota" is exceeded as well, "rx_next" will not be reset to the first RX mailbox and hence the interrupts remain disabled. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Tested-by: Amr Bekhit <amrbekhit@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b4fedbe commit 63b9e0f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/net/can/at91_can.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,10 @@ static int at91_poll_rx(struct net_device *dev, int quota)
712712

713713
/* upper group completed, look again in lower */
714714
if (priv->rx_next > get_mb_rx_low_last(priv) &&
715-
quota > 0 && mb > get_mb_rx_last(priv)) {
715+
mb > get_mb_rx_last(priv)) {
716716
priv->rx_next = get_mb_rx_first(priv);
717-
goto again;
717+
if (quota > 0)
718+
goto again;
718719
}
719720

720721
return received;

0 commit comments

Comments
 (0)