From: Stephane Grosjean <s.grosjean@peak-system.com>
To: Andri Yngvason <andri.yngvason@marel.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>,
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 12:42:58 +0100 [thread overview]
Message-ID: <5666C242.8090506@peak-system.com> (raw)
In-Reply-To: <20151208105026.GA13146@maxwell.marel.net>
Hi Andri,
So, you mean that, for example, the below sequence (extract from _xmit()):
priv->write_reg(priv, SJA1000_FI, fi);
priv->write_reg(priv, SJA1000_ID1, (id & 0x000007f8) >> 3);
priv->write_reg(priv, SJA1000_ID2, (id & 0x00000007) << 5);
...
(1)
...
sja1000_write_cmdreg(priv, CMD_TR);
can't be interrupted at all (especially at (1)), by any IRQ which ISR
could write (again) some new ID?
I mean, shouldn't the SJA1000 and the sequence order of the cmds be
considered as shared resource?
Regards,
Stéphane
Le 08/12/2015 11:50, Andri Yngvason a écrit :
> Hi Stephane,
>
> On Tue, Dec 08, 2015 at 11:21:26AM +0100, Stephane Grosjean wrote:
>> 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,
> You have spin locks sprinkled around the pcan driver even where there isn't a
> specific shared resource that's being protected.
>
> However, a nice side-effect of that is that the interrupt routine is not allowed
> to run concurrently with the xmit function, so the command register is never
> written to so frequently as in the linux-can driver.
> [...]
>> 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?
> I don't know. I'm not sure if you hinted at the answer to this question. Did the
> problem go away? I guess it did due to the reasons that I mentioned above.
>
> This does not strike at the core of the issue. A targeted solution is to add a
> delay.
> [...]
>> 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
>>>
> Regards,
> Andri
--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt
Handelsregister Darmstadt HRB 9183
Geschaeftsfuehrung: Alexander Gach, Uwe Wilhelm
--
next prev parent reply other threads:[~2015-12-08 11:43 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
2015-12-08 10:50 ` Andri Yngvason
2015-12-08 11:42 ` Stephane Grosjean [this message]
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=5666C242.8090506@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).