All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Austin Schuh <austin@peloton-tech.com>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Jason R1 White <White_Jason_R1@cat.com>,
	linux-can@vger.kernel.org, linux-can-owner@vger.kernel.org
Subject: Re: Bus off
Date: Sat, 28 Jun 2014 10:52:21 +0200	[thread overview]
Message-ID: <53AE8245.7080005@grandegger.com> (raw)
In-Reply-To: <CANGgnMbyLN0C-dmGOv8Qyo05jXSFxK81iNuqLTK2a4wo9CfzYg@mail.gmail.com>

On 06/28/2014 03:29 AM, Austin Schuh wrote:
> Thanks everyone!  Reading this thread has been very informative.  I
> was hoping that the buffers would get flushed on BUS_OFF, but it
> sounds like that is hard to do.
> 
> I'm not sure exactly what is going on with the machine in question,
> and I don't really have physical access to sort it out.  The kernel
> messages that I was getting now make a lot more sense.  I'll see if I
> can change how I detect other nodes shutting down to fix that.

You are welcome to show the kernel messages. After re-reading your first
mail of this thread I'm still puzzled what's going on. A node goes
bus-off in case of serious electrical problems on the bus, e.g. improper
termination, bitrate does not matches, etc. It does *not* go bus off
just because no other nodes are on the bus (ack slot error).

Wolfgang.

> On Fri, Jun 27, 2014 at 10:34 AM, Oliver Hartkopp
> <socketcan@hartkopp.net> wrote:
>> On 27.06.2014 18:28, Wolfgang Grandegger wrote:
>>> On 06/27/2014 05:45 PM, Jason R1 White wrote:
>>>> So is it still the recommendation to close the interface to flush the
>>>> queues?
>>>
>>> As I said: the purpose of "restart" is not to do a fast if down->up.
>>>
>>>> Is there anything planned for an ip command or IOCTL to do this?
>>>
>>> It's on the wish list, let's say. Somebody needs to implement it. It's
>>> also not straight-forward because there might be more than one socket
>>> sending out CAN messages. For standard network devices there is no way
>>> to flush all TX queues, IIRC.
>>
>> Probably shutting down the netdevice at BUS_OFF would be an alternative to
>> restart-ms. When the netdevice is down all sockets are notified by -ENETDOWN.
>>
>> We would need some kind of notification when frames got lost anyway. And after
>> -ENETDOWN the application can recover and set up it's communication again.
>>
>> Regards,
>> Oliver
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


  reply	other threads:[~2014-06-28  8:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 17:13 Bus off Austin Schuh
2014-06-26 22:54 ` Max S.
2014-06-27  7:04   ` Marc Kleine-Budde
2014-06-27  5:05 ` Kurt Van Dijck
2014-06-27 15:22   ` Jason R1 White
2014-06-27 15:35     ` Wolfgang Grandegger
2014-06-27 15:45       ` Jason R1 White
2014-06-27 15:50         ` Marc Kleine-Budde
2014-06-27 16:28         ` Wolfgang Grandegger
2014-06-27 17:34           ` Oliver Hartkopp
2014-06-28  1:29             ` Austin Schuh
2014-06-28  8:52               ` Wolfgang Grandegger [this message]
2014-06-28 18:48                 ` Austin Schuh

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=53AE8245.7080005@grandegger.com \
    --to=wg@grandegger.com \
    --cc=White_Jason_R1@cat.com \
    --cc=austin@peloton-tech.com \
    --cc=linux-can-owner@vger.kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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.