* [PATCH] at91_can: RX queue could get stuck at high bus load
@ 2016-06-13 13:44 Wolfgang Grandegger
2016-06-17 9:06 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2016-06-13 13:44 UTC (permalink / raw)
To: linux-can; +Cc: Marc Kleine-Budde, Amr Bekhit
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>
---
drivers/net/can/at91_can.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 8b3275d..8f5e93c 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -712,9 +712,10 @@ static int at91_poll_rx(struct net_device *dev, int quota)
/* upper group completed, look again in lower */
if (priv->rx_next > get_mb_rx_low_last(priv) &&
- quota > 0 && mb > get_mb_rx_last(priv)) {
+ mb > get_mb_rx_last(priv)) {
priv->rx_next = get_mb_rx_first(priv);
- goto again;
+ if (quota > 0)
+ goto again;
}
return received;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] at91_can: RX queue could get stuck at high bus load
2016-06-13 13:44 [PATCH] at91_can: RX queue could get stuck at high bus load Wolfgang Grandegger
@ 2016-06-17 9:06 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2016-06-17 9:06 UTC (permalink / raw)
To: Wolfgang Grandegger, linux-can; +Cc: Amr Bekhit
[-- Attachment #1.1: Type: text/plain, Size: 747 bytes --]
On 06/13/2016 03:44 PM, Wolfgang Grandegger wrote:
> 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>
Applied to can/master + stable on Cc.
tnx,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-17 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 13:44 [PATCH] at91_can: RX queue could get stuck at high bus load Wolfgang Grandegger
2016-06-17 9:06 ` Marc Kleine-Budde
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.