mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 1/4] drivers: net: fec_imx: fix receive issue with external switch
Date: Wed,  2 Nov 2022 11:07:41 +0100	[thread overview]
Message-ID: <20221102100744.1949741-1-o.rempel@pengutronix.de> (raw)

Enable poromisc mode by default to allow using multiple MAC address on
same FEC interfaces.

We already use poromisc mode on designware stmmac, so it will make
behavior more consistent on different systems.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/fec_imx.c | 3 +++
 drivers/net/fec_imx.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 673555a48a..9aa4b4f595 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -262,6 +262,9 @@ static int fec_init(struct eth_device *dev)
 	 */
 	rcntl = FEC_R_CNTRL_MAX_FL(1518);
 
+	/* Set promisc mode to make switches with different ethaddr work */
+	rcntl |= FEC_R_CNTRL_PROMISC;
+
 	rcntl |= FEC_R_CNTRL_MII_MODE;
 	/*
 	 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
diff --git a/drivers/net/fec_imx.h b/drivers/net/fec_imx.h
index 316eefe48f..9bb1c64b55 100644
--- a/drivers/net/fec_imx.h
+++ b/drivers/net/fec_imx.h
@@ -58,6 +58,7 @@
 #define FEC_R_CNTRL_RMII_10T		(1 << 9) /* i.MX28 specific */
 #define FEC_R_CNTRL_RMII_MODE		(1 << 8) /* i.MX28 specific */
 #define FEC_R_CNTRL_FCE			(1 << 5)
+#define FEC_R_CNTRL_PROMISC		(1 << 3)
 #define FEC_R_CNTRL_MII_MODE		(1 << 2)
 
 #define FEC_IEVENT_HBERR                0x80000000 /* Note: Not on i.MX28 */
-- 
2.30.2




             reply	other threads:[~2022-11-02 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 10:07 Oleksij Rempel [this message]
2022-11-02 10:07 ` [PATCH v1 2/4] net: dsa: fix of_device_ensure_probed*() for switch ports Oleksij Rempel
2022-11-02 10:07 ` [PATCH v1 3/4] ARM: boards: skov-imx6: assigned separate MAC address to LAN2 Oleksij Rempel
2022-11-02 11:18   ` Sascha Hauer
2022-11-02 10:07 ` [PATCH v1 4/4] ARM: boards: skov-imx6: convert all pr_ to dev_ prints Oleksij Rempel
2022-11-02 11:20   ` Sascha Hauer
2022-11-02 11:08 ` [PATCH v1 1/4] drivers: net: fec_imx: fix receive issue with external switch Sascha Hauer

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=20221102100744.1949741-1-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=barebox@lists.infradead.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