Netdev Archive on
help / color / mirror / Atom feed
From: Marc Kleine-Budde <>
Cc:,,,, Marc Kleine-Budde <>
Subject: [net 6/6] can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ
Date: Sat, 24 Jul 2021 19:19:47 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

In case an error occurred in the IRQ handler, the chip status is
dumped via devcoredump and all IRQs are disabled, but the chip stays
powered for further analysis.

The chip is in an undefined state and will not receive any CAN frames,
so shut down the timestamping worker, which reads the TBC register
regularly, too. This avoids any CRC read error messages if there is a
communication problem with the chip.

Fixes: efd8d98dfb90 ("can: mcp251xfd: add HW timestamp infrastructure")
Signed-off-by: Marc Kleine-Budde <>
 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
index 47c3f408a799..9ae48072b6c6 100644
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
@@ -2300,6 +2300,7 @@ static irqreturn_t mcp251xfd_irq(int irq, void *dev_id)
 		   err, priv->regs_status.intf);
+	mcp251xfd_timestamp_stop(priv);
 	return handled;

  parent reply	other threads:[~2021-07-24 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 17:19 pull-request: can 2021-07-24 Marc Kleine-Budde
2021-07-24 17:19 ` [net 1/6] arm64: dts: imx8mp: remove fallback compatible string for FlexCAN Marc Kleine-Budde
2021-07-24 17:19 ` [net 2/6] can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF Marc Kleine-Budde
2021-07-24 17:19 ` [net 3/6] can: j1939: j1939_session_deactivate(): clarify lifetime of session object Marc Kleine-Budde
2021-07-24 17:19 ` [net 4/6] can: j1939: j1939_xtp_rx_dat_one(): fix rxtimer value between consecutive TP.DT to 750ms Marc Kleine-Budde
2021-07-24 17:19 ` [net 5/6] can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values Marc Kleine-Budde
2021-07-24 17:19 ` Marc Kleine-Budde [this message]
2021-07-24 18:40 ` pull-request: can 2021-07-24 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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [net 6/6] can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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