On 05.11.2024 17:20:39, Renjaya Raga Zenta wrote: > File is attached. Thanks. Hmmmm it looks correct to me. Are you sure, that you are actually using the patch? | ----------------------- FIFO 0 - TEF ----------------- | | TEFSTA: tefsta(0x044)=0x00000007 | TEFOVIF Transmit Event FIFO Overflow Interrupt Flag | TEFFIF x Transmit Event FIFO Full Interrupt Flag (0: not full) | TEFHIF x Transmit Event FIFO Half Full Interrupt Flag (0: < half full) | TEFNEIF x Transmit Event FIFO Not Empty Interrupt Flag (0: empty) | | ----------------------- FIFO 3 - TX ------------------ | | FIFOSTA: fifosta(0x078)=0x00000107 | FIFOCI = 1 FIFO Message Index | TXABT Message Aborted Status (0: completed successfully, 1: aborted) | TXLARB Message Lost Arbitration Status | TXERR Error Detected During Transmission | TXATIF Transmit Attempts Exhausted Interrupt Pending | RXOVIF Receive FIFO Overflow Interrupt Flag | TFERFFIF x Transmit/Receive FIFO Empty/Full Interrupt Flag | TFHRFHIF x Transmit/Receive FIFO Half Empty/Half Full Interrupt Flag | TFNRFNIF x Transmit/Receive FIFO Not Full/Not Empty Interrupt Flag 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; } regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature