mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Daniel Golle <daniel@makrotopia.org>, Elad Yifee <eladwf@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
	Mark Lee <Mark-MC.Lee@mediatek.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH net-next] net: ethernet: mediatek: Allow gaps in MAC allocation
Date: Tue, 2 Jul 2024 08:58:22 +0200	[thread overview]
Message-ID: <3bda121b-f11d-44d1-a761-15195f8a418c@intel.com> (raw)
In-Reply-To: <379ae584cea112db60f4ada79c7e5ba4f3364a64.1719862038.git.daniel@makrotopia.org>

On 7/1/24 21:28, Daniel Golle wrote:
> Some devices with MediaTek SoCs don't use the first but only the second
> MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY
> connected to the second MAC this is quite common.
> Make sure to reset and enable PSE also in those cases by skipping gaps
> using 'continue' instead of aborting the loop using 'break'.
> 
> Fixes: dee4dd10c79a ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs")
> Suggested-by: Elad Yifee <eladwf@gmail.com>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> Note that this should go to 'net-next' because the commit being fixed
> isn't yet part of the 'net' tree.

makes sense, and the fix is correct, so:
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

> 
>   drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 13d78d9b3197..2529b5b607c8 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -3396,7 +3396,7 @@ static int mtk_open(struct net_device *dev)
>   
>   		for (i = 0; i < MTK_MAX_DEVS; i++) {
>   			if (!eth->netdev[i])
> -				break;
> +				continue;
>   
>   			target_mac = netdev_priv(eth->netdev[i]);
>   			if (!soc->offload_version) {


what about:
4733│ static int mtk_sgmii_init(struct mtk_eth *eth)
4734│ {
4735│         struct device_node *np;
4736│         struct regmap *regmap;
4737│         u32 flags;
4738│         int i;
4739│
4740│         for (i = 0; i < MTK_MAX_DEVS; i++) {
4741│                 np = of_parse_phandle(eth->dev->of_node, 
"mediatek,sgmiisys", i);
4742│                 if (!np)
4743│                         break;

should we also continue here?

4744│
4745│                 regmap = syscon_node_to_regmap(np);
4746│                 flags = 0;
4747│                 if (of_property_read_bool(np, "mediatek,pnswap"))
4748│                         flags |= MTK_SGMII_FLAG_PN_SWAP;
4749│
4750│                 of_node_put(np);
4751│
4752│                 if (IS_ERR(regmap))
4753│                         return PTR_ERR(regmap);
4754│
4755│                 eth->sgmii_pcs[i] = mtk_pcs_lynxi_create(eth->dev, 
regmap,
4756│ 
eth->soc->ana_rgc3,
4757│                                                          flags);
4758│         }
4759│
4760│         return 0;
4761│ }


  reply	other threads:[~2024-07-02  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 19:28 Daniel Golle
2024-07-02  6:58 ` Przemek Kitszel [this message]
2024-07-02  9:05   ` Daniel Golle
2024-07-05 11:24     ` Daniel Golle
2024-07-05 12:55       ` Przemek Kitszel
2024-07-06  0:00 ` 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=3bda121b-f11d-44d1-a761-15195f8a418c@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eladwf@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.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

all inboxes | Powered by JetHome®