All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: xenomai@xenomai.org
Subject: Re: [Xenomai] RTcan: Assertation failed
Date: Mon, 26 Sep 2016 14:55:55 +0200	[thread overview]
Message-ID: <26ca535c-fc89-5482-c2f4-e2ebd898e056@grandegger.com> (raw)
In-Reply-To: <984827b9-0e03-f90c-f269-ceaa42cd4d4c@grandegger.com>

Hello,

more on that subject:

Am 26.09.2016 um 14:04 schrieb Wolfgang Grandegger:
> Hello,
>
> Am 26.09.2016 um 09:49 schrieb Jack Lee:
>>
>>  [ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0%
>>  [ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>>  [ 5911.271868] Assertion failed!
>>  drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket == 0
>>  [ 5911.271872] (1) TX skb still in use
>>  [ 6011.087098] rtcan0: real bitrate 1000000, sampling point 75.0%
>>  [ 6011.087119] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>>  [ 7985.615408] perf interrupt took too long (2512 > 2500), lowering
>>  kernel.perf_event_max_sample_rate to 50000
>>
>>
>> Hi, Wolfgang,
>>
>> I got this error with my advantech PCM26D2CA CAN-board when real-time
>> applications were running.
>>
>> The PCM26D2CA board has two ports: "rtcan0" was used by user
>> applications and "rtcan1" was used by "rtcanrecv" to monitor CAN bus.
>>
>> The bitrate was set previously and not set explicitly here.
>
> What do you mean? It looks like bitrate was set while the interface was
> active... which should not be allowed. But unfortunately, it is. Anyway,
> I can not see how that function is called accidentally. Must be done
> somehow by you system. Or are there any other related messages in kernel
> log (dmesg) indicating that there was a bus error.

I had a closer look to the code. Actually it's allowed to set the 
bit-timing while interface is active. It will be stopped and restarted 
afterwards... but the reset of the loopback handling is missing. That 
needs a fix.

Wolfgang.


  reply	other threads:[~2016-09-26 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26  7:49 [Xenomai] RTcan: Assertation failed Jack Lee
2016-09-26 12:04 ` Wolfgang Grandegger
2016-09-26 12:55   ` Wolfgang Grandegger [this message]
     [not found] <27f25f2c-b872-9c8f-9068-bb3e8d3e1d1e@foxmail.com>
2016-09-27  1:57 ` Jack Lee
2016-09-27  6:13   ` 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=26ca535c-fc89-5482-c2f4-e2ebd898e056@grandegger.com \
    --to=wg@grandegger.com \
    --cc=xenomai@xenomai.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.