linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Thomas.Kopp@microchip.com
Cc: Stefan.Althoefer@janztec.com, linux-can@vger.kernel.org
Subject: Re: RE: AW: AW: mcp251xfd: Bad message receiption (1/2)
Date: Tue, 10 Jan 2023 15:53:22 +0100	[thread overview]
Message-ID: <20230110145322.4bqwlw3owesc5myj@pengutronix.de> (raw)
In-Reply-To: <BL3PR11MB64849F53D129B61D79952538FBFF9@BL3PR11MB6484.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

On 10.01.2023 12:50:18, Thomas.Kopp@microchip.com 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-01-10 14:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  7:44 mcp251xfd: Bad message receiption Stefan Althöfer
2022-12-22  9:07 ` Thomas.Kopp
2022-12-22 10:30   ` AW: " Stefan Althöfer
2022-12-22 13:02     ` Marc Kleine-Budde
2022-12-23  8:18       ` AW: " Stefan Althöfer
2022-12-23 19:25         ` Marc Kleine-Budde
2022-12-24 15:57         ` Marc Kleine-Budde
2022-12-30 22:51           ` AW: " Stefan Althöfer
2023-01-01 10:43             ` Stefan Althöfer
2023-01-04 15:55               ` Stefan Althöfer
2023-01-09  7:10                 ` AW: AW: AW: mcp251xfd: Bad message receiption (1/2) Stefan Althöfer
2023-01-10 12:50                   ` Thomas.Kopp
2023-01-10 14:53                     ` Marc Kleine-Budde [this message]
2023-01-10 17:08                       ` Marc Kleine-Budde
2023-01-10 18:39                         ` Marc Kleine-Budde
2023-01-10 21:40                           ` Thomas.Kopp
2023-01-10 21:50                             ` Marc Kleine-Budde
2023-01-10 22:37                               ` Marc Kleine-Budde
2023-01-10 22:43                                 ` Marc Kleine-Budde
2023-01-11  8:17                                   ` Marc Kleine-Budde
2023-01-11 11:54                                     ` Marc Kleine-Budde
2023-01-09  7:10                 ` AW: AW: AW: mcp251xfd: Bad message receiption (2/2) Stefan Althöfer
2022-12-22 14:51 ` mcp251xfd: Bad message receiption Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230110145322.4bqwlw3owesc5myj@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Stefan.Althoefer@janztec.com \
    --cc=Thomas.Kopp@microchip.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).