From: David Jander <david@protonic.nl>
To: wg@grandegger.com, mkl@pengutronix.de
Cc: linux-can@vger.kernel.org, David Jander <david@protonic.nl>
Subject: [PATCH 3/3] can: flexcan.c: Implement last step of workaround for errata ERR005829
Date: Wed, 27 Aug 2014 11:58:07 +0200 [thread overview]
Message-ID: <1409133487-23367-4-git-send-email-david@protonic.nl> (raw)
In-Reply-To: <1409133487-23367-1-git-send-email-david@protonic.nl>
It is not clear if this errata only applies to i.MX6, but the impact of
the workaround should be minimal. Basically it comes down to reserving
mailbox 0 as a permanently inactive MB and writing twice to its C/S field
on every message transmit.
Signed-off-by: David Jander <david@protonic.nl>
---
drivers/net/can/flexcan.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index bf444ff..3998d4c 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -434,6 +434,10 @@ static int flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
flexcan_write(can_id, ®s->cantxfg[FLEXCAN_TX_BUF_ID].can_id);
flexcan_write(ctrl, ®s->cantxfg[FLEXCAN_TX_BUF_ID].can_ctrl);
+ /* Errata ERR005829 step8: Write twice INACTIVE(0b1000) code to MB 0 */
+ flexcan_write(FLEXCAN_MB_CNT_CODE(0x8), ®s->cantxfg[0].can_ctrl);
+ flexcan_write(FLEXCAN_MB_CNT_CODE(0x8), ®s->cantxfg[0].can_ctrl);
+
return NETDEV_TX_OK;
}
--
1.9.1
next prev parent reply other threads:[~2014-08-27 10:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 9:58 [PATCH 0/3] Decrease likelyhood of RX overruns David Jander
2014-08-27 9:58 ` [PATCH 1/3] can: flexcan.c: Correctly initialize mailboxes David Jander
2014-09-02 10:24 ` Marc Kleine-Budde
2014-09-02 10:37 ` David Jander
2014-09-02 10:59 ` Marc Kleine-Budde
2014-09-02 11:15 ` David Jander
2014-09-02 13:54 ` Marc Kleine-Budde
2014-09-02 14:27 ` David Jander
2014-09-02 11:32 ` David Jander
2014-09-02 11:38 ` Marc Kleine-Budde
2014-09-02 14:53 ` Marc Kleine-Budde
2014-08-27 9:58 ` [PATCH 2/3] can: flexcan.c: Re-write receive path to use MB queue instead of FIFO David Jander
2014-09-02 11:30 ` Marc Kleine-Budde
2014-09-02 12:04 ` David Jander
2014-09-02 14:53 ` Marc Kleine-Budde
2014-09-03 7:19 ` David Jander
2014-09-03 9:12 ` Marc Kleine-Budde
2014-09-03 15:42 ` David Jander
2014-08-27 9:58 ` David Jander [this message]
2014-09-02 11:28 ` [PATCH 3/3] can: flexcan.c: Implement last step of workaround for errata ERR005829 Marc Kleine-Budde
2014-09-02 11:36 ` David Jander
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=1409133487-23367-4-git-send-email-david@protonic.nl \
--to=david@protonic.nl \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--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).