From: Torin Cooper-Bennun <torin@maxiluxsystems.com>
To: Mariusz Madej <mariusz.madej@xtrack.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: [PATCH] can: m_can: reset IR_RF0L in message reception loop
Date: Wed, 3 Mar 2021 08:08:09 +0000 [thread overview]
Message-ID: <20210303080809.zfjh6oolqxcv4pir@bigthink> (raw)
In-Reply-To: <0710fbd2-4b88-21bf-88f7-0b97d7e7dc0b@xtrack.com>
On Mon, Mar 01, 2021 at 10:21:27PM +0100, Mariusz Madej wrote:
> Message lost warning is reported in loop without interrupt reset. Besides
> redundant log messages it may lead to serious performance problem, where
> fifo gets full faster than next reception is scheduled by NAPI. This
> patch fixes it.
Looking at the flow in m_can_rx_handler, it looks as though
m_can_handle_bus_errors -> m_can_handle_lost_msg already handles message
loss properly, and issues a netdev_err. I wonder whether we can remove
the warning from m_can_do_rx_poll entirely:
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 3752520a7d4b..d783c46cac16 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -501,9 +501,6 @@ static int m_can_do_rx_poll(struct net_device *dev, int quota)
}
while ((rxfs & RXFS_FFL_MASK) && (quota > 0)) {
- if (rxfs & RXFS_RFL)
- netdev_warn(dev, "Rx FIFO 0 Message Lost\n");
-
m_can_read_fifo(dev, rxfs);
quota--;
---
Regards,
Torin Cooper-Bennun
Software Engineer | maxiluxsystems.com
next prev parent reply other threads:[~2021-03-04 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 21:21 [PATCH] can: m_can: reset IR_RF0L in message reception loop Mariusz Madej
2021-03-03 8:08 ` Torin Cooper-Bennun [this message]
2021-03-03 8:31 ` Marc Kleine-Budde
2021-03-03 10:20 ` Torin Cooper-Bennun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210303080809.zfjh6oolqxcv4pir@bigthink \
--to=torin@maxiluxsystems.com \
--cc=linux-can@vger.kernel.org \
--cc=mariusz.madej@xtrack.com \
--cc=mkl@pengutronix.de \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox