From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: "Thomas Körper" <Thomas.Koerper@esd.eu>
Cc: Andri Yngvason <andri.yngvason@marel.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH V5 1/1] can: Add support for esd CAN PCIe/402 card
Date: Tue, 17 Mar 2015 09:26:39 +0200 [thread overview]
Message-ID: <20150317072639.GA2802@Darwish.PC> (raw)
In-Reply-To: <8CE1D0B9BFD2404DA079DDE1814A6F2E03294EFD39B3@esd-s3.esd.local>
Hi Thomas,
On Tue, Mar 17, 2015 at 07:30:02AM +0100, Thomas Körper wrote:
> Hi Andri,
>
> I've looked at the sources you mentioned, but I'm a little bit unsure now /
> the handling seems not perfectly consistent to me. (flexcan calls
> can_change_state() with tx/rx_state of 0 in the bus off path.
>
There're discrpeancies indeed on the BUSOFF path:
1) flexcan calls can_change_state(dev, cf, 0, 0). kvaser and others
do can_change_state(dev, cf, tx, rx) where either tx or rx =
CAN_STATE_BUS_OFF. In this case, kvaser and the other drivers
are the _correct_ behavior. This is validated by can-dev
can_chage_state() code:
if (unlikely(new_state == CAN_STATE_BUS_OFF)) {
cf->can_id |= CAN_ERR_BUSOFF;
return;
}
2) flexcan calls can_bus_off(dev), while kvaser goes a layer deeper
and directly calls netif_carrier_off(netdev). In this case,
flexcan is the more correct behavior.
Thanks,
Darwish
next prev parent reply other threads:[~2015-03-17 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 12:15 [PATCH V5 1/1] can: Add support for esd CAN PCIe/402 card Thomas Körper
2015-03-16 12:46 ` Andri Yngvason
2015-03-16 13:35 ` Marc Kleine-Budde
2015-03-17 6:30 ` AW: " Thomas Körper
2015-03-17 7:26 ` Ahmed S. Darwish [this message]
2015-03-17 10:10 ` Andri Yngvason
2015-03-17 10:33 ` AW: " Andri Yngvason
2015-03-17 21:27 ` Marc Kleine-Budde
2015-03-18 5:08 ` Thomas Körper
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=20150317072639.GA2802@Darwish.PC \
--to=darwish.07@gmail.com \
--cc=Thomas.Koerper@esd.eu \
--cc=andri.yngvason@marel.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.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.