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

On Wed, Nov 02, 2022 at 11:07:41AM +0100, Oleksij Rempel wrote:
> Enable poromisc mode by default to allow using multiple MAC address on
> same FEC interfaces.

s/poromisc/promiscuous/

> 
> 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;
> +

Shouldn't we rather enable promiscuous mode in an extra callback?
In the end we want promiscuous mode only in specific cases, not
generally.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Sascha Hauer [this message]

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=20221102110853.GL3143@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.de \
    /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