From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, bhupesh.sharma@st.com, tomoya.rohm@gmail.com
Subject: Re: [RFC v2 0/7] pch_can/c_can: fix races and add PCH support to c_can
Date: Thu, 06 Dec 2012 18:14:12 +0100 [thread overview]
Message-ID: <9545085.epYbjMqEeA@ws-stein> (raw)
In-Reply-To: <50C0AC38.8080405@grandegger.com>
Hello Wolfgang,
On Thursday 06 December 2012 15:31:20, Wolfgang Grandegger wrote:
> >> Error on MSG ID 0x252. Got counter 96480 and expected 96466
> >> Error on MSG ID 0x251. Got counter 96480 and expected 96466
> >> Error on MSG ID 0x252. Got counter 101706 and expected 101696
> >> Error on MSG ID 0x251. Got counter 101706 and expected 101696
> > Here were messages missed/dropped for both CAN-IDs.
>
> It is interesting that the same number of messages are missing for both
> IDs... which come from different CAN nodes, right?
Yep, node 1 sends 0x251 and node 2 sends 0x252.
> Do you see dropped messages with "ip -d -s link show canX"?
> Did you check if the protocol layer did drop messages. You can
> use "candump -d" to find that out.
My test application says:
Error on MSG ID 0x251. Got counter 8442 and expected 8427
Error on MSG ID 0x252. Got counter 8442 and expected 8426
Error on MSG ID 0x251. Got counter 8794 and expected 8792
Error on MSG ID 0x252. Got counter 8794 and expected 8791
Message counters: 0x251: 249982, 0x252: 249980
ip -s -d link show can0:
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1000000 sample-point 0.700
tq 100 prop-seg 3 phase-seg1 3 phase-seg2 3 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 50000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
1999980 501239 0 0 0 0
TX: bytes packets errors dropped carrier collsns
8 1 0 0 0 0
candump -d can0,0~0,#ffffffff didn't show anything. I used the filter to reduce the load from that ssh session.
On Thursday 06 December 2012 15:02:39, Marc Kleine-Budde wrote:
> >> Error on MSG ID 0x251. Got counter 108673 and expected 108672
> >> Error on MSG ID 0x251. Got counter 108672 and expected 108674
> >> Error on MSG ID 0x251. Got counter 108674 and expected 108673
> > ^^^^^^
> > Here you can see the CAN frame with counter 108673 is read before 108672.
>
> You could add some offset/mask to the counter data of MSG ID 0x252 to
> see if they get mixed up.
Yep, nice idea. But I've no idea whether I get the possibility to modify the firmware for that.
> This is a typical out-of-sequence reception with a
> RX-goes-into-first-free-mailbox hardware. I've implemented the algorithm
> used in the at91 and fixed the one for the ti_hecc.
Marc, do you mean out-of-sequence reception with such mailbox types can happen even with the algorithm used in c_can and at91?
Best regards,
Alexander
next prev parent reply other threads:[~2012-12-06 17:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 14:39 [RFC v2 0/7] pch_can/c_can: fix races and add PCH support to c_can Wolfgang Grandegger
2012-11-29 14:39 ` [RFC v2 1/7] pch_can: add spinlocks to protect tx objects Wolfgang Grandegger
2012-11-29 14:39 ` [RFC v2 2/7] c_can: rename callback "initram" to "init" to more general usage Wolfgang Grandegger
2012-12-03 14:20 ` Alexander Stein
2012-12-03 14:32 ` Wolfgang Grandegger
2012-11-29 14:39 ` [RFC v2 3/7] c_can: use different sets of interface registers for rx and tx Wolfgang Grandegger
2012-11-30 8:39 ` Marc Kleine-Budde
2012-11-30 9:15 ` Wolfgang Grandegger
2012-11-29 14:39 ` [RFC v2 4/7] c_can_pci: introduce board specific PCI bar Wolfgang Grandegger
2012-11-30 8:45 ` Marc Kleine-Budde
2012-11-30 9:11 ` Wolfgang Grandegger
2012-11-30 9:19 ` Marc Kleine-Budde
2012-11-29 14:39 ` [RFC v2 5/7] c_can_pci: enable PCI bus master only for MSI Wolfgang Grandegger
2012-11-30 8:54 ` Marc Kleine-Budde
2012-11-29 14:39 ` [RFC v2 6/7] c_can_pci: add support for PCH CAN on Intel EG20T PCH Wolfgang Grandegger
2012-11-29 14:39 ` [RFC v2 7/7] c_can: add spinlock to protect tx and rx objects Wolfgang Grandegger
2012-12-05 12:09 ` [RFC v2 0/7] pch_can/c_can: fix races and add PCH support to c_can Alexander Stein
2012-12-05 12:50 ` Wolfgang Grandegger
2012-12-05 14:46 ` Alexander Stein
2012-12-05 17:35 ` Wolfgang Grandegger
2012-12-05 21:52 ` Marc Kleine-Budde
2012-12-06 7:09 ` Wolfgang Grandegger
2012-12-06 8:35 ` Marc Kleine-Budde
2012-12-06 8:17 ` Wolfgang Grandegger
2012-12-06 13:38 ` Alexander Stein
2012-12-06 14:02 ` Marc Kleine-Budde
2012-12-06 14:31 ` Wolfgang Grandegger
2012-12-06 14:37 ` Marc Kleine-Budde
2012-12-06 14:56 ` Alexander Stein
2012-12-06 15:15 ` Wolfgang Grandegger
2012-12-06 15:27 ` Wolfgang Grandegger
2012-12-06 15:55 ` Alexander Stein
2012-12-06 17:14 ` Alexander Stein [this message]
2012-12-06 23:34 ` Marc Kleine-Budde
2012-12-07 9:26 ` Wolfgang Grandegger
2012-12-07 9:55 ` Marc Kleine-Budde
2012-12-07 10:00 ` Bhupesh SHARMA
2012-12-07 10:09 ` 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=9545085.epYbjMqEeA@ws-stein \
--to=alexander.stein@systec-electronic.com \
--cc=bhupesh.sharma@st.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=tomoya.rohm@gmail.com \
--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 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).