All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Thomas.Kopp@microchip.com, linux-can@vger.kernel.org
Subject: Re: mcp25xxfd: missing cerrif
Date: Tue, 11 Feb 2020 14:51:34 +0100	[thread overview]
Message-ID: <532b4fed-a984-0875-d933-43c6a90fcc1a@pengutronix.de> (raw)
In-Reply-To: <MN2PR11MB36450B9C2BE91F6CBA897002FB180@MN2PR11MB3645.namprd11.prod.outlook.com>

On 2/11/20 2:31 PM, Thomas.Kopp@microchip.com wrote:
>>> - The transmitter or receiver transitions from Error Passive to Error
>>>   Active state

>> I don't see this interrupt, neither on the mcp2517fd nor on the
>> mcp2518fd rev0.0.
> 
> What do you mean you don't see the interrupt?

If the chip transitions from Error Passive to Error Active state the
CERRIF is not set.

> I just did a quick test (non linux environment but with our test
> board and I do see CERRIF being set and it's possible to clear via
> SPI). What exactly are you checking?
Below code is from the driver and illustrates the problem:

> 		/* On the MCP2527FD and MCP2518FD, we don't get a
> 		 * CERRIF IRQ on the transition TX ERROR_WARNING -> TX
> 		 * ERROR_ACTIVE.
> 		 */
> 		if (intf_pending & MCP25XXFD_CAN_INT_CERRIF ||
> 		    priv->can.state > CAN_STATE_ERROR_ACTIVE) {
> 			err = mcp25xxfd_handle(priv, cerrif);
> 			if (err)
> 				goto out_fail;
> 		}

On the transition from "TX ERROR_WARNING -> TX ERROR_ACTIVE" the CERRIF
is not set.

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 |

  reply	other threads:[~2020-02-11 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 12:53 mcp25xxfd: missing cerrif Marc Kleine-Budde
2020-02-11 13:31 ` Thomas.Kopp
2020-02-11 13:51   ` Marc Kleine-Budde [this message]
2020-02-12  9:59     ` Thomas.Kopp
2020-02-14 13:59       ` Marc Kleine-Budde
2020-02-18 11:44         ` Thomas.Kopp

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=532b4fed-a984-0875-d933-43c6a90fcc1a@pengutronix.de \
    --to=mkl@pengutronix.de \
    --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 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.