can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
authorAxel Forsman <axfo@kvaser.com>
Tue, 20 May 2025 11:43:32 +0000 (13:43 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 20 May 2025 19:35:39 +0000 (21:35 +0200)
commit6d820b81c4dc4a4023e45c3cd6707a07dd838649
treed51cef2a5e023ddfdfd2c3b8f54dd4789a96c815
parent8256e0ca601051933e9395746817f3801fa9a6bf
can: kvaser_pciefd: Continue parsing DMA buf after dropped RX

Going bus-off on a channel doing RX could result in dropped packets.

As netif_running() gets cleared before the channel abort procedure,
the handling of any last RDATA packets would see netif_rx() return
non-zero to signal a dropped packet. kvaser_pciefd_read_buffer() dealt
with this "error" by breaking out of processing the remaining DMA RX
buffer.

Only return an error from kvaser_pciefd_read_buffer() due to packet
corruption, otherwise handle it internally.

Cc: stable@vger.kernel.org
Signed-off-by: Axel Forsman <axfo@kvaser.com>
Tested-by: Jimmy Assarsson <extja@kvaser.com>
Reviewed-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://patch.msgid.link/20250520114332.8961-4-axfo@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/kvaser_pciefd.c