All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sven Schuchmann <schuchmann@schleissheimer.de>
Cc: "Thomas.Kopp@microchip.com" <Thomas.Kopp@microchip.com>,
	"pavel.modilaynen@volvocars.com" <pavel.modilaynen@volvocars.com>,
	"drew@beagleboard.org" <drew@beagleboard.org>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"menschel.p@posteo.de" <menschel.p@posteo.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"will@macchina.cc" <will@macchina.cc>
Subject: Re: [net-next 6/6] can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register
Date: Thu, 9 Dec 2021 12:27:48 +0100	[thread overview]
Message-ID: <20211209112748.yixzz4xskw6qm7bw@pengutronix.de> (raw)
In-Reply-To: <PA4P190MB1390F869654448440F869BCBD9709@PA4P190MB1390.EURP190.PROD.OUTLOOK.COM>

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

On 09.12.2021 11:17:09, Sven Schuchmann wrote:
> we are also seeing the CRC Errors in our setup (rpi4, Kernel 5.10.x)
> from time to time. I just wanted to post here what I am seeing, maybe
> it helps...
> 
> [    6.761711] spi_master spi1: will run message pump with realtime priority
> [    6.778063] mcp251xfd spi1.0 can1: MCP2518FD rev0.0 (-RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:40.00MHz m:20.00MHz r:17.00MHz e:16.66MHz) successfully initialized.
> 
> [ 4327.107856] mcp251xfd spi1.0 canfd1: CRC read error at address 0x0010 (length=4, data=00 cc 62 c4, CRC=0xa3a0) retrying.
> [ 7770.163335] mcp251xfd spi1.0 canfd1: CRC read error at address 0x0010 (length=4, data=00 bf 16 d5, CRC=0x9d3c) retrying.
> [ 8000.565955] mcp251xfd spi1.0 canfd1: CRC read error at address 0x0010 (length=4, data=00 40 66 fa, CRC=0x31d7) retrying.
> [ 9753.658173] mcp251xfd spi1.0 canfd1: CRC read error at address 0x0010 (length=4, data=80 e9 01 4e, CRC=0xe862) retrying.

You are using the a back port of my HW timestamp in your v5.10 branch.
So every 45 seconds the TBC register (address 0x0010) is read,
additionally for every CAN error frame.

In the mean time, I've implemented a workaround for the CRC read errors:

| c7eb923c3caf can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register
| ef7a8c3e7599 can: mcp251xfd: mcp251xfd_regmap_crc_read_one(): Factor out crc check into separate function

It fixes the CRC read error, if the first data byte is 0x00 or 0x80.

These messages should disappear, if you cherry-pick the above patches.

regards,
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:[~2021-12-09 11:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07  8:01 pull-request: can-next 2021-04-07 Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 1/6] can: skb: alloc_can{,fd}_skb(): set "cf" to NULL if skb allocation fails Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 2/6] can: m_can: m_can_receive_skb(): add missing error handling to can_rx_offload_queue_sorted() call Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 3/6] can: c_can: remove unused enum BOSCH_C_CAN_PLATFORM Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 4/6] can: mcp251xfd: add BQL support Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 5/6] can: mcp251xfd: mcp251xfd_regmap_crc_read_one(): Factor out crc check into separate function Marc Kleine-Budde
2021-04-07  8:01 ` [net-next 6/6] can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register Marc Kleine-Budde
2021-04-21 19:58   ` Drew Fustini
2021-04-22  7:18     ` Marc Kleine-Budde
2021-04-22 16:46       ` Patrick Menschel
2021-05-07  7:25       ` Marc Kleine-Budde
2021-05-07  8:21         ` Patrick Menschel
2021-05-07  8:25           ` Marc Kleine-Budde
2021-05-08 18:36             ` Patrick Menschel
2021-05-09  7:46               ` Patrick Menschel
2021-05-10  7:45                 ` Marc Kleine-Budde
2021-05-20 10:29                   ` Patrick Menschel
2021-05-10  7:43               ` Marc Kleine-Budde
2021-12-07 16:53                 ` Modilaynen, Pavel
2021-12-08  8:54                   ` Marc Kleine-Budde
2021-12-09 10:22                   ` Thomas.Kopp
2021-12-09 11:17                     ` AW: " Sven Schuchmann
2021-12-09 11:27                       ` Marc Kleine-Budde [this message]
2021-12-09 12:53                         ` Sven Schuchmann
2021-12-13 22:12                     ` Modilaynen, Pavel
2021-12-21 22:24                       ` Thomas.Kopp
2022-06-21 14:25                         ` Marc Kleine-Budde
2022-06-22  8:19                           ` Marc Kleine-Budde
2022-06-22 13:47                           ` Thomas.Kopp
2022-06-26 19:14                         ` Marc Kleine-Budde
2021-05-07 22:36         ` Drew Fustini
2021-05-08 12:30           ` Marc Kleine-Budde
2021-04-07 22:10 ` pull-request: can-next 2021-04-07 patchwork-bot+netdevbpf

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=20211209112748.yixzz4xskw6qm7bw@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Thomas.Kopp@microchip.com \
    --cc=drew@beagleboard.org \
    --cc=linux-can@vger.kernel.org \
    --cc=menschel.p@posteo.de \
    --cc=netdev@vger.kernel.org \
    --cc=pavel.modilaynen@volvocars.com \
    --cc=schuchmann@schleissheimer.de \
    --cc=will@macchina.cc \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.