mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/4] drivers: net: fec_imx: fix receive issue with external switch
@ 2022-11-02 10:07 Oleksij Rempel
  2022-11-02 10:07 ` [PATCH v1 2/4] net: dsa: fix of_device_ensure_probed*() for switch ports Oleksij Rempel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Oleksij Rempel @ 2022-11-02 10:07 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-02 11:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 10:07 [PATCH v1 1/4] drivers: net: fec_imx: fix receive issue with external switch Oleksij Rempel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox