On Tue, Nov 5, 2024 at 6:03 PM Marc Kleine-Buddewrote:
> Please add this patch, compile, reproduce the issue, send me the
> devcoredump and the log output.
>
> --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
> +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
> @@ -149,6 +149,10 @@ mcp251xfd_get_tef_len(struct mcp251xfd_priv *priv, u8 *len_p)
> len = (chip_tx_tail << shift) - (tail << shift);
> *len_p = len >> shift;
>
> + if (*len_p == 0)
> + netdev_err(priv->ndev, "%s: fifo_sta=0x%08x head=0x%08x tail=0x%08x\n", __func__,
> + fifo_sta, tx_ring->head, tx_ring->tail);
> +
> return 0;
> }
I applied this patch manually because it couldn't be applied after your "mcp251xfd_get_tef_len(): fix length calculation" patch.
The log (dmesg | grep spi)
[ 125.501493] mcp251xfd spi0.0 can1: mcp251xfd_get_tef_len: fifo_sta=0x00000103 head=0x00004a95 tail=0x00004a91
[ 125.511420] mcp251xfd spi0.0 can1: IRQ handler mcp251xfd_handle_tefif() returned -22.
[ 125.519250] mcp251xfd spi0.0 can1: IRQ handler returned -22 (intf=0xbf1a0010).
The devcoredump file is attached.
[ 125.519250] mcp251xfd spi0.0 can1: IRQ handler returned -22 (intf=0xbf1a0010).
The devcoredump file is attached.
Regards,
Renjaya
Attachment:
devcoredump-20241105-114659.dump
Description: Binary data