From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>,
linux-can Mailing List <linux-can@vger.kernel.org>,
stern@rowland.harvard.edu
Subject: Re: [PATCH 2/3 V3.1] can/usb: PEAK-System Technik PCAN-USB specific part
Date: Fri, 20 Jan 2012 15:53:30 +0100 [thread overview]
Message-ID: <4F197FEA.10007@peak-system.com> (raw)
In-Reply-To: <4F19718A.7020801@grandegger.com>
Hi,
Found time to answer to all of you:
- first, thanks for your review and tests
- next, I did a new version of the driver which fixes Alan's issue about
the variables in the stack, and which is *very* much less verbose too.
- the driver itself sets now the can state according to some usb adapter
events
When unplugging the can cable, candump displays now:
can4 20000004 [8] 00 30 00 00 00 00 00 00 ERRORFRAME
controller-problem{rx-error-passive,tx-error-passive}
can4 20000004 [8] 00 30 00 00 00 00 00 00 ERRORFRAME
controller-problem{rx-error-passive,tx-error-passive}
can4 20000004 [8] 00 30 00 00 00 00 00 00 ERRORFRAME
controller-problem{rx-error-passive,tx-error-passive}
can4 20000004 [8] 00 30 00 00 00 00 00 00 ERRORFRAME
controller-problem{rx-error-passive,tx-error-passive}
...
I'm looking now to do the short circuit to check for bus-off manual
restart. I also confirm that auto restart hangs the kernel.
Thanks and regards,
Stéphane
Le 20/01/2012 14:52, Wolfgang Grandegger a écrit :
> On 01/20/2012 02:37 PM, Oliver Hartkopp wrote:
>> On 20.01.2012 13:36, Wolfgang Grandegger wrote:
>>> On 01/20/2012 01:34 PM, Wolfgang Grandegger wrote:
>>>> Hi Oliver,
>>>>
>>>> On 01/20/2012 01:28 PM, Oliver Hartkopp wrote:
>>>>
>>>>> @Wolfgang: I always get "RTNETLINK answers: Device or resource busy"
>>>>> when the device is up - even on the EMS PCMCIA card. Should the manual
>>>>> restart generally be also possible even when the device is up??
>>>> The restart is only for bus-off recovery. It will *not* restart if you
>>>> are not in bus-off.
>> Ah, ok. Reading the *open* source helps :-))
>>
>>>>> I think the automatic restart (with restart-ms) has no preconditions to
>>>>> the device up/down state.
>>>> But it only triggers in case of bus-off. It has nothing to do with up/down.
>>> If you are at it, please also test the bus-off and bus-off recovery...
>>> Thanks...
>> Yes. Good point.
>>
>> I set the PCAN-USB adapter (can2) to 100000 bit/s and let the two other
>> nodes at 500kbit/s.
>>
>> With low traffic at 500kbit and sending one frame from the PCAN-USB
>> (cansend can2 123#00) the bus-off is easy to reach on can2.
>>
>> But the effect is:
>>
>> I get every second(!) an error msg with
>>
>> can2 20000044 [8] 00 30 00 00 00 00 00 00 ERRORFRAME
>> controller-problem{rx-error-passive,tx-error-passive}
>> bus-off
>>
>> But the state displayed in
>>
>> ip -details -statistics link show can2
>>
>> always says
>>
>> 15: can2:<NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN qlen 10
>> link/can
>> can state ERROR-ACTIVE restart-ms 0
>>
>> ... with increasing bus-off counter every second.
>>
>> After setting the two other nodes at 100kbit/s too and do some traffic there, the
>> state of the PCAN-USB should get back to work - but is does not.
>>
>> The error msgs every second remain from can2.
> The CAN error state is *not* handled at all in the driver :(. Obviously
> I missed that. Stephane, could you please check error state changes to
> error passive (no calble) and bus-off (short-circuit) and bus-off
> recovery. "ip -d -s link show can0" and "candump any,0:0,#FFFFFFFF -e"
> will give you useful information. Or even better, show use the output.
>
> Thanks,
>
> Wolfgang.
--
PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt
Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt
HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391
Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com
next prev parent reply other threads:[~2012-01-20 14:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-19 10:27 [PATCH 0/3 V3.1] can/usb: Add PEAK-System PCAN USB adapters driver Stephane Grosjean
2012-01-19 10:27 ` [PATCH 2/3 V3.1] can/usb: PEAK-System Technik PCAN-USB specific part Stephane Grosjean
2012-01-19 15:07 ` Alan Stern
2012-01-20 7:52 ` Oliver Hartkopp
2012-01-20 12:28 ` Oliver Hartkopp
2012-01-20 12:34 ` Wolfgang Grandegger
2012-01-20 12:36 ` Wolfgang Grandegger
2012-01-20 13:37 ` Oliver Hartkopp
2012-01-20 13:52 ` Wolfgang Grandegger
2012-01-20 14:53 ` Stephane Grosjean [this message]
2012-01-20 17:32 ` Wolfgang Grandegger
[not found] ` <1326968863-20229-1-git-send-email-s.grosjean-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.org>
2012-01-19 10:27 ` [PATCH 1/3 V3.1] can/usb: PEAK-System Technik USB adapters driver core Stephane Grosjean
2012-01-19 10:27 ` [PATCH 3/3 V3.1] can/usb: PEAK-System Technik PCAN-USB Pro specific part Stephane Grosjean
2012-01-19 19:08 ` [PATCH 0/3 V3.1] can/usb: Add PEAK-System PCAN USB adapters driver Oliver Hartkopp
2012-01-20 9:28 ` 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=4F197FEA.10007@peak-system.com \
--to=s.grosjean@peak-system.com \
--cc=linux-can@vger.kernel.org \
--cc=oliver.hartkopp@volkswagen.de \
--cc=stern@rowland.harvard.edu \
--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.