Skip to contentSkip to conversation

can: m_can: m_can_do_rx_poll(): fix extraneous msg loss warning

PATCH In review Torin Cooper-Bennun 2 participants 2 messages Mar 4, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: m_can: m_can_do_rx_poll(): fix extraneous msg loss warning

Message loss from RX FIFO 0 is already handled in m_can_handle_lost_msg, with netdev output included.

Removing this warning also improves driver performance under heavy load, where m_can_do_rx_poll may be called many times before this interrupt is cleared, causing this message to be output many times (thanks Mariusz Madej for this report).

---
 drivers/net/can/m_can/m_can.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/m_can/m_can.c +0 -3
index 3752520a7d4b..d783c46cac16 100644
@@ -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--;
Signature · 1 line
2.30.1
#1 lore raw
Quoted 10 lines · Torin Cooper-Bennun

Message loss from RX FIFO 0 is already handled in m_can_handle_lost_msg, with netdev output included.

Removing this warning also improves driver performance under heavy load, where m_can_do_rx_poll may be called many times before this interrupt is cleared, causing this message to be output many times (thanks Mariusz Madej for this report).

Applied to linux-can/testing.

regards,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |