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

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

 



> Hope this doesn't start to get annoying!

Absolutely not, having the data and you debugging this is helpful.

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

I'll try to find the rootcause and what can be done to mitigate this.

Best Regards,
Thomas




[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