All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: socketcan-core@domain.hid, Oliver Hartkopp <socketcan@domain.hid>,
	xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Re: RT-Socket-CAN bus error rate and latencies
Date: Mon, 02 Apr 2007 18:22:15 +0200	[thread overview]
Message-ID: <46112DB7.9090200@domain.hid> (raw)
In-Reply-To: <460529D2.7020406@domain.hid>

Hello,

Jan Kiszka wrote:
> Wolfgang Grandegger wrote:
>> ...
>> Attached is the patch and it works fine. The key function
>> rtcan_sja_enable_bus_err() is called from sendmsg():
>>
>> void rtcan_sja_enable_bus_err(struct rtcan_device *dev)
>> {
>>     struct rtcan_sja1000 *chip = (struct rtcan_sja1000 *)dev->priv;
>>
>>     if (chip->bus_err_on < 2) {
>>     if (chip->bus_err_on < 1)
>>         chip->read_reg(dev, SJA_ECC);
>>     chip->bus_err_on = 2;
>>     }
>> }
>>
>> And I do also do not see a real problem with multiple readers. I would
>> commit this solution. I'm just unsure if we should select it silently or
>> if the user should have the choice.
> 
> I would say no to user-selectability unless someone comes up with a
> serious downside of this approach.
> 
> Are there any other error interrupt sources we should treat the same
> way? Or all? Just to make the behaviour as regular as reasonable. I have
> no opinion yet, I only want to make sure we have considered this as well
> before we set the change API in stone.
> 
> Nice work!

OK, I have just commited the following changes:

2007-04-02  Wolfgang Grandegger  <wg@domain.hid>

  * ksrc/drivers/can/*: The option CONFIG_XENO_DRIVERS_CAN_BUS_ERR now
    enables bus error interrupts when an application is calling a receive
    function on a socket listening on bus errors. After one bus error has
    occured, the interrupt will be disabled to allow the application time
    for error processing and to efficiently avoid bus error interrupt
    flooding. This option is automatically selected for CAN controllers
    supporting bus error interrupts like the SJA1000.

  * include/rtdm/rtcan.h: Add some doc on bus-off and bus-error error
    conditions and the restart policy.

  * src/utils/can/rtcanconfig.c: Controller mode settings and doc
    has been corrected.

Wolfgang.


  reply	other threads:[~2007-04-02 16:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20 18:58 [Xenomai-core] RT-Socket-CAN bus error rate and latencies Wolfgang Grandegger
2007-03-20 19:10 ` Jan Kiszka
2007-03-20 19:29   ` Wolfgang Grandegger
2007-03-21 17:14 ` [Xenomai-core] " Wolfgang Grandegger
     [not found]   ` <46017CA7.2080801@domain.hid>
2007-03-21 20:29     ` Wolfgang Grandegger
2007-03-21 21:43       ` Jan Kiszka
2007-03-22  8:08         ` Wolfgang Grandegger
     [not found]           ` <46036D32.7000603@domain.hid>
     [not found]             ` <46036F22.60709@domain.hid>
2007-03-23  8:34               ` Jan Kiszka
2007-03-23  8:51                 ` Wolfgang Grandegger
2007-03-24 11:51                   ` Wolfgang Grandegger
2007-03-24 13:38                     ` Jan Kiszka
2007-04-02 16:22                       ` Wolfgang Grandegger [this message]
2007-04-07 21:03                         ` Jan Kiszka
2007-04-07 21:12                           ` Wolfgang Grandegger
2007-03-23  8:37             ` Wolfgang Grandegger
     [not found] <460237BD.1020205@domain.hid>
2007-03-22  8:12 ` 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=46112DB7.9090200@domain.hid \
    --to=wg@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=socketcan-core@domain.hid \
    --cc=socketcan@domain.hid \
    --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.