All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: "Ira W. Snyder" <iws@ovro.caltech.edu>
Cc: socketcan-core@lists.berlios.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, sameo@linux.intel.com
Subject: Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN	module
Date: Mon, 22 Mar 2010 20:23:42 +0100	[thread overview]
Message-ID: <4BA7C3BE.8040306@grandegger.com> (raw)
In-Reply-To: <4BA7C236.9060609@grandegger.com>

Wolfgang Grandegger wrote:
> Ira W. Snyder wrote:
>> On Sat, Mar 20, 2010 at 08:55:16AM +0100, Wolfgang Grandegger wrote:
>>> Ira W. Snyder wrote:
> [snip]
>>>> Does this seem right? It seems pretty good to me.
>>> Yes, I'm just missing an error-passive message. What state does "ip -d
>>> link show can0" report.
>>>
>> Ok, here is what I did:
>>
>> $ ip link set can0 up type can bitrate 1000000
>> $ ip link set can1 up type can bitrate 1000000 berr-reporting on
>> $ ip -d -s link
>> 5: 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.750
>>     tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
>>     janz-ican3: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>     clock 8000000  
>>     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
>>     0          0        0       0       0       0
>>     TX: bytes  packets  errors  dropped carrier collsns
>>     0          0        0       0       0       0
>> 6: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
>>     link/can       
>>     can <BERR-REPORTING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>     bitrate 1000000 sample-point 0.750
>>     tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
>>     janz-ican3: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>     clock 8000000  
>>     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
>>     0          0        0       0       0       0
>>     TX: bytes  packets  errors  dropped carrier collsns
>>     0          0        0       0       0       0
>>
>> Now, in seperate windows, I ran cansequence and candump. I stopped
>> cansequence when it could not send any more packets (due to the cable
>> being unplugged).
>>
>> $ cansequence -v -e -p can0
>> $ cansequence -v -e -p can1
>> $ candump any,0~0,#FFFFFFFF
>>   can0  20000004  [8] 00 08 00 00 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000004  [8] 00 08 00 00 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>
>> This last message is repeated lots more times. That's the flooding we're
>> avoiding with berr-reporting off.
>>
>> I see two types of messages here:
>> 1) bus error (only on can1)
>> 2) controller problems -- tx warning limit reached (both)
>>
>> Am I missing some message? My error frame generation was mostly copied
>> from the sja1000 driver.
> 
> It seem that you are not getting the error passive interrupt even...

Because you do not enable/handle it. CEVTIND_EPI seems to be missing:

http://lxr.linux.no/#linux+v2.6.33/drivers/net/can/sja1000/sja1000.c#L403

Wolfgang.

WARNING: multiple messages have this Message-ID (diff)
From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
To: "Ira W. Snyder" <iws-lulEs6mt1IksTUYHLfqkUA@public.gmane.org>
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN	module
Date: Mon, 22 Mar 2010 20:23:42 +0100	[thread overview]
Message-ID: <4BA7C3BE.8040306@grandegger.com> (raw)
In-Reply-To: <4BA7C236.9060609-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>

Wolfgang Grandegger wrote:
> Ira W. Snyder wrote:
>> On Sat, Mar 20, 2010 at 08:55:16AM +0100, Wolfgang Grandegger wrote:
>>> Ira W. Snyder wrote:
> [snip]
>>>> Does this seem right? It seems pretty good to me.
>>> Yes, I'm just missing an error-passive message. What state does "ip -d
>>> link show can0" report.
>>>
>> Ok, here is what I did:
>>
>> $ ip link set can0 up type can bitrate 1000000
>> $ ip link set can1 up type can bitrate 1000000 berr-reporting on
>> $ ip -d -s link
>> 5: 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.750
>>     tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
>>     janz-ican3: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>     clock 8000000  
>>     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
>>     0          0        0       0       0       0
>>     TX: bytes  packets  errors  dropped carrier collsns
>>     0          0        0       0       0       0
>> 6: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
>>     link/can       
>>     can <BERR-REPORTING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
>>     bitrate 1000000 sample-point 0.750
>>     tq 125 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
>>     janz-ican3: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
>>     clock 8000000  
>>     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
>>     0          0        0       0       0       0
>>     TX: bytes  packets  errors  dropped carrier collsns
>>     0          0        0       0       0       0
>>
>> Now, in seperate windows, I ran cansequence and candump. I stopped
>> cansequence when it could not send any more packets (due to the cable
>> being unplugged).
>>
>> $ cansequence -v -e -p can0
>> $ cansequence -v -e -p can1
>> $ candump any,0~0,#FFFFFFFF
>>   can0  20000004  [8] 00 08 00 00 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000004  [8] 00 08 00 00 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>   can1  20000088  [8] 00 00 80 19 00 00 00 00   ERRORFRAME
>>
>> This last message is repeated lots more times. That's the flooding we're
>> avoiding with berr-reporting off.
>>
>> I see two types of messages here:
>> 1) bus error (only on can1)
>> 2) controller problems -- tx warning limit reached (both)
>>
>> Am I missing some message? My error frame generation was mostly copied
>> from the sja1000 driver.
> 
> It seem that you are not getting the error passive interrupt even...

Because you do not enable/handle it. CEVTIND_EPI seems to be missing:

http://lxr.linux.no/#linux+v2.6.33/drivers/net/can/sja1000/sja1000.c#L403

Wolfgang.

  reply	other threads:[~2010-03-22 19:25 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 16:38 [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module Ira W. Snyder
2010-03-19  9:01 ` Wolfgang Grandegger
2010-03-19  9:01   ` Wolfgang Grandegger
2010-03-19 15:19   ` Ira W. Snyder
2010-03-19 15:19     ` Ira W. Snyder
2010-03-19 15:45     ` Wolfgang Grandegger
2010-03-19 20:03       ` Ira W. Snyder
2010-03-19 20:13         ` Wolfgang Grandegger
2010-03-19 20:13           ` Wolfgang Grandegger
2010-03-19 21:52           ` Ira W. Snyder
2010-03-20  7:55             ` Wolfgang Grandegger
2010-03-20  7:55               ` Wolfgang Grandegger
2010-03-22 15:53               ` Ira W. Snyder
2010-03-22 15:53                 ` Ira W. Snyder
2010-03-22 19:17                 ` Wolfgang Grandegger
2010-03-22 19:17                   ` Wolfgang Grandegger
2010-03-22 19:23                   ` Wolfgang Grandegger [this message]
2010-03-22 19:23                     ` Wolfgang Grandegger
2010-03-22 20:12                     ` Ira W. Snyder
2010-03-22 20:12                       ` Ira W. Snyder
2010-03-22 20:10                   ` Ira W. Snyder
2010-03-22 20:10                     ` Ira W. Snyder
2010-03-22 20:28                     ` Wolfgang Grandegger
2010-03-22 20:28                       ` Wolfgang Grandegger
2010-03-22 20:51                       ` Ira W. Snyder
2010-03-22 20:51                         ` Ira W. Snyder
2010-03-22 21:24                         ` Wolfgang Grandegger
2010-03-22 21:24                           ` Wolfgang Grandegger
  -- strict thread matches above, loose matches on Subject: below --
2010-03-29 16:58 Ira W. Snyder
2010-03-29 16:58 ` Ira W. Snyder
2010-03-30  8:14 ` Wolfgang Grandegger
2010-03-30  8:14   ` Wolfgang Grandegger
2010-03-31  6:46   ` David Miller
2010-04-01 20:03 ` Andrew Morton
2010-04-02  0:43   ` Ira W. Snyder
2010-04-02  0:43     ` Ira W. Snyder
2010-03-02 21:22 [PATCH 0/3 RFCv4] add support for Janz MODULbus devices Ira W. Snyder
2010-03-02 21:22 ` [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module Ira W. Snyder
2010-03-17 19:33   ` Ira W. Snyder
2010-03-18  8:36     ` Wolfgang Grandegger
2010-03-18 15:19       ` Ira W. Snyder
2010-03-18 16:06         ` Wolfgang Grandegger

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=4BA7C3BE.8040306@grandegger.com \
    --to=wg@grandegger.com \
    --cc=iws@ovro.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=socketcan-core@lists.berlios.de \
    /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.