Skip to content

Commit

Permalink
can: m_can: m_can_do_rx_poll(): fix extraneous msg loss warning
Browse files Browse the repository at this point in the history
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).

Fixes: e0d1f48 ("can: m_can: add Bosch M_CAN controller support")
Link: https://lore.kernel.org/r/20210303103151.3760532-1-torin@maxiluxsystems.com
Reported-by: Mariusz Madej <mariusz.madej@xtrack.com>
Signed-off-by: Torin Cooper-Bennun <torin@maxiluxsystems.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Torin Cooper-Bennun authored and Marc Kleine-Budde committed Mar 16, 2021
1 parent 6e2fe01 commit c0e399f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/can/m_can/m_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit c0e399f

Please sign in to comment.