From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Wolfgang Grandegger <wg@grandegger.com>,
linux-can@vger.kernel.org
Subject: Re: [PATCH] c_can: Add support for eg20t (pch_can)
Date: Tue, 08 Apr 2014 10:36:23 +0200 [thread overview]
Message-ID: <3071984.okmx4UfXFK@ws-stein> (raw)
In-Reply-To: <alpine.DEB.2.02.1404081017370.14882@ionos.tec.linutronix.de>
On Tuesday 08 April 2014 10:26:23, Thomas Gleixner wrote:
> > So I noticed that with CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING=n
> > (NEWDAT and INTPEND cleared immediately) the "odd behavior" occurs
> > pretty often.
> > Before
> > c_can_rx_object_get(dev, obj);
> > NEWDAT is still set, but afterwards it is already cleared in
> > C_CAN_NEWDAT1_REG.
>
> Which is expected. We clear the newdat bit in c_can_rx_object_get(),
> which updates C_CAN_NEWDAT1_REG as well.
>
> > I guess the NEWDAT is already cleared in the message object before
> > reading from the message object with this line
>
> > > ctrl = priv->read_reg(priv, C_CAN_IFACE(MSGCTRL_REG, IF_RX));
> >
> > So I removed that IF_MCONT_NEWDAT check (see below) and I didn't
> > lose any message, but get 5 duplicates in 250000 messages (no
> > reordering though).
> >
> > Setting CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING=y with that patch I
> > lose ~650msg per 250000 frames.
>
> What happens, if you apply the patch below?
>
> Thanks,
>
> tglx
>
> Index: linux-2.6/drivers/net/can/c_can/c_can.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/can/c_can/c_can.c
> +++ linux-2.6/drivers/net/can/c_can/c_can.c
> @@ -880,7 +880,7 @@ static int c_can_do_rx_poll(struct net_d
>
> while (quota > 0) {
> if (!pend) {
> - pend = priv->read_reg(priv, C_CAN_INTPND1_REG);
> + pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG);
> if (!pend)
> break;
> /*
Your patch "can: c_can: Get rid of pointless interrupts" already did that change. Or did you mean the reverse?
Regards,
Alexander
--
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
Am Windrad 2
08468 Heinsdorfergrund
Tel.: 03765 38600-1156
Fax: 03765 38600-4100
Email: alexander.stein@systec-electronic.com
Website: www.systec-electronic.com
Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Chemnitz, HRB 28082
next prev parent reply other threads:[~2014-04-08 8:37 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 14:14 [PATCH] c_can: Add support for eg20t (pch_can) Alexander Stein
2014-04-03 14:55 ` Alexander Stein
2014-04-03 14:59 ` Marc Kleine-Budde
2014-04-03 15:11 ` Thomas Gleixner
2014-04-03 15:47 ` Alexander Stein
2014-04-03 19:28 ` Oliver Hartkopp
2014-04-03 20:59 ` Thomas Gleixner
2014-04-03 20:28 ` Thomas Gleixner
2014-04-03 18:41 ` Wolfgang Grandegger
2014-04-07 9:47 ` Alexander Stein
2014-04-07 10:19 ` Wolfgang Grandegger
2014-04-07 12:06 ` Thomas Gleixner
2014-04-07 12:07 ` Marc Kleine-Budde
2014-04-07 12:24 ` Alexander Stein
2014-04-07 12:34 ` Thomas Gleixner
2014-04-07 12:48 ` Alexander Stein
2014-04-07 12:56 ` Thomas Gleixner
2014-04-07 12:58 ` Alexander Stein
2014-04-07 13:31 ` Thomas Gleixner
2014-04-07 14:27 ` Alexander Stein
2014-04-07 15:24 ` Thomas Gleixner
2014-04-07 15:36 ` Alexander Stein
2014-04-07 15:53 ` Thomas Gleixner
2014-04-07 16:06 ` Alexander Stein
2014-04-07 16:27 ` Thomas Gleixner
2014-04-08 7:07 ` Alexander Stein
2014-04-08 8:26 ` Thomas Gleixner
2014-04-08 8:36 ` Alexander Stein [this message]
2014-04-08 7:18 ` Alexander Stein
2014-04-08 7:35 ` Thomas Gleixner
2014-04-07 16:27 ` Wolfgang Grandegger
2014-04-07 20:03 ` Thomas Gleixner
2014-04-08 6:17 ` Alexander Stein
2014-04-08 8:04 ` Thomas Gleixner
2014-04-07 18:11 ` Marc Kleine-Budde
2014-04-07 18:15 ` Thomas Gleixner
2014-04-17 19:53 ` 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=3071984.okmx4UfXFK@ws-stein \
--to=alexander.stein@systec-electronic.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=tglx@linutronix.de \
--cc=wg@grandegger.com \
/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.