linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 3/6] net: gianfar: Clear CAR registers
Date: Thu, 17 Jun 2021 11:49:20 +0200	[thread overview]
Message-ID: <fe53d563c9b53266273f6fee148cbc34c1258d2f.1623922686.git.esben@geanix.com> (raw)
In-Reply-To: <cover.1623922686.git.esben@geanix.com>

The CAR1 and CAR2 registers are W1C style registers, to the memset does not
actually clear them.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index a0277fe8cc60..ebd1065f39fa 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -3103,6 +3103,9 @@ static void gfar_hw_init(struct gfar_private *priv)
 		/* Mask off the CAM interrupts */
 		gfar_write(&regs->rmon.cam1, 0xffffffff);
 		gfar_write(&regs->rmon.cam2, 0xffffffff);
+		/* Clear the CAR registers (w1c style) */
+		gfar_write(&regs->rmon.car1, 0xffffffff);
+		gfar_write(&regs->rmon.car2, 0xffffffff);
 	}
 
 	/* Initialize ECNTRL */
-- 
2.32.0


  parent reply	other threads:[~2021-06-17  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  9:49 [PATCH 0/6] net: gianfar: 64-bit statistics and rx_missed_errors counter Esben Haabendal
2021-06-17  9:49 ` [PATCH 1/6] net: gianfar: Convert to ndo_get_stats64 interface Esben Haabendal
2021-06-17  9:49 ` [PATCH 2/6] net: gianfar: Extend statistics counters to 64-bit Esben Haabendal
2021-06-17  9:49 ` Esben Haabendal [this message]
2021-06-17  9:49 ` [PATCH 4/6] net: gianfar: Avoid 16 bytes of memset Esben Haabendal
2021-06-17  9:49 ` [PATCH 5/6] net: gianfar: Add definitions for CAR1 and CAM1 register bits Esben Haabendal
2021-06-17  9:49 ` [PATCH 6/6] net: gianfar: Implement rx_missed_errors counter Esben Haabendal
2021-06-17 19:20 ` [PATCH 0/6] net: gianfar: 64-bit statistics and " patchwork-bot+netdevbpf

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=fe53d563c9b53266273f6fee148cbc34c1258d2f.1623922686.git.esben@geanix.com \
    --to=esben@geanix.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=netdev@vger.kernel.org \
    /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).