linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	Andri Yngvason <andri.yngvason@marel.com>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can@vger.kernel.org, wg@grandegger.com,
	hrafnkell.eiriksson@marel.com, haukur.hafsteinsson@marel.com
Subject: Re: peak_pci: TX Frame Loss
Date: Tue, 8 Dec 2015 11:21:26 +0100	[thread overview]
Message-ID: <5666AF26.2080806@peak-system.com> (raw)
In-Reply-To: <56602B1D.90601@pengutronix.de>

Hi!

Don't know atm what is buggier, but:

- the issue isn't reproducible with our Windows drivers,
- the issue isn't reproducible with the pcan driver,

IMHO, and after having read and compared the sja1000 and the pcan code, 
I would like clarification on:

- the sja1000_start_xmit() function: what about two (or more) tasks 
running this function on a SMP system, and, of course, writing to the 
same SJA1000? Especially, running the (non-protected) sequence of 
several consecutive "priv->write_reg()" ?

- in the same vein, what happens when an IRQ occurs in the middle of the 
_xmit()  (non-protected) write_reg() sequence?

FYI, I have surrounded the _xmit() function as well as the ISR with 
couples of spin_lock/spin_unlock instructions, rebuild everything and 
have ran Andri's testbed... and guess what?

So, my question is: I'm far from getting the whole knowledge of how the 
net/can core handles multiple access to the same hardware (maybe 
concurrent access is managed somewhere else in the network stack, never 
know), but I don't explain how things can run correctly without 
guaranteeing at least the writing sequences to the SJA1000 registers...

Once again, maybe I'm wrong. ATM, the testbed always runs as it should...

Regards,

Stéphane


Le 03/12/2015 12:44, Marc Kleine-Budde a écrit :
> On 12/03/2015 12:23 PM, Andri Yngvason wrote:
>> I tried it and it's not enough. The sja1000 on the peak pci is an FPGA
>> implementation that claims to be sja1000 compatible. Is it possible that peak's
>> FPGA implementation is slower than the original sja1000?
> Maybe buggier :)
>
> Marc
>

--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt
Handelsregister Darmstadt HRB 9183 
Geschaeftsfuehrung: Alexander Gach, Uwe Wilhelm
--

  reply	other threads:[~2015-12-08 10:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 14:51 peak_pci: TX Frame Loss Andri Yngvason
2015-11-19  8:38 ` Stephane Grosjean
2015-11-19 10:12   ` Andri Yngvason
2015-12-02 18:09 ` Andri Yngvason
2015-12-02 19:19   ` Oliver Hartkopp
2015-12-03  6:37     ` Oliver Hartkopp
2015-12-03 11:23       ` Andri Yngvason
2015-12-03 11:44         ` Marc Kleine-Budde
2015-12-08 10:21           ` Stephane Grosjean [this message]
2015-12-08 10:50             ` Andri Yngvason
2015-12-08 11:42               ` Stephane Grosjean
2015-12-08 12:24                 ` Andri Yngvason
2015-12-08 14:12                   ` [BULK]Re: " Stephane Grosjean
2015-12-22  8:13                   ` Stephane Grosjean
2015-12-22 11:51                     ` Andri Yngvason
2015-12-03 16:37         ` Stephane Grosjean
2015-12-03  8:20     ` Marc Kleine-Budde

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=5666AF26.2080806@peak-system.com \
    --to=s.grosjean@peak-system.com \
    --cc=andri.yngvason@marel.com \
    --cc=haukur.hafsteinsson@marel.com \
    --cc=hrafnkell.eiriksson@marel.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).