From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Mirza Krak <mirza.krak@hostmobility.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>, linux-can@vger.kernel.org
Subject: Re: Dual SJA1000 can controllers on SMP system.
Date: Mon, 17 Jun 2013 09:18:33 +0200 [thread overview]
Message-ID: <51BEB849.3020409@pengutronix.de> (raw)
In-Reply-To: <51BEA863.1040704@hostmobility.com>
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
On 06/17/2013 08:10 AM, Mirza Krak wrote:
> Aah off course. The low-level device driver is sja1000_platform.c. The
> functions I am using are sp_read_reg8 and sp_write_reg8 which I have
> slightly modified. Since I don't use multiplexed bus functionality I
> write the address first.
>
> static u8 sp_read_reg8(const struct sja1000_priv *priv, int reg)
> {
> iowrite8(reg, priv->reg_base);
^^^^^^^^
> return ioread8(priv->reg_base + 0x20);
> }
>
> static void sp_write_reg8(const struct sja1000_priv *priv, int reg, u8 val)
> {
> iowrite8(reg, priv->reg_base);
^^^^^^^^
> iowrite8(val, (priv->reg_base + 0x20));
> }
Can you post a proper patch, so that we can see what you have changed?
You probably have a nice race condition here. The two iowrites have to
be atomic.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2013-06-17 7:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 11:20 Dual SJA1000 can controllers on SMP system mirza
2013-06-16 12:39 ` Wolfgang Grandegger
2013-06-17 6:10 ` Mirza Krak
2013-06-17 7:18 ` Marc Kleine-Budde [this message]
2013-06-17 13:46 ` Mirza Krak
2013-06-17 14:12 ` Marc Kleine-Budde
2013-06-17 18:49 ` Mirza Krak
2013-06-17 19:34 ` Wolfgang Grandegger
-- strict thread matches above, loose matches on Subject: below --
2013-06-13 12:47 Mirza Krak
2013-06-16 9:20 ` 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=51BEB849.3020409@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mirza.krak@hostmobility.com \
--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 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.