Re: RE: AW: AW: mcp251xfd: Bad message receiption (1/2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.01.2023 12:50:18, Thomas.Kopp@xxxxxxxxxxxxx wrote:
> > For the last case, I attached debugger after the fail an tried to read from the
> > socket until read returned -1:
> >     (gdb) p malloc(72)
> >     (gdb) p read(sockfd,$1,72)
> >     (gdb) print fprint_canframe_mtu(stdout, $1, "\n", 4, 72) And surprise
> > surprise, there were more CAN frames in store. Refer to the log/pdf.
> 
> I was finally able to reproduce the issue and capture a full SPI/CAN
> log when it happens. At this point it looks like the tail pointer of
> the FIFO in the MCP2518FD gets corrupted and the driver does what it's
> supposed to do and reads out lots of frames...

You mean the head pointer?

> So yeah, I see all the
> frames being read via SPI multiple times which matches what you found
> with your gdb approach.

> It's interesting to see that this wasn't noticed before - I have
> reproduced this issue also with cangen (when manually comparing TX/RX
> counters)

Marc

-- 
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 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux