public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Srinivas Neeli <srinivas.neeli@amd.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, michal.simek@amd.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	richardcochran@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, git@amd.com
Subject: Re: [RFC PATCH 4/8] xilinx: tsn: Add Ethernet MAC (EMAC) and MDIO support to the TSN driver
Date: Fri, 20 Feb 2026 16:12:59 +0100	[thread overview]
Message-ID: <39ae9c0f-d832-4771-8177-838995fff4da@lunn.ch> (raw)
In-Reply-To: <20260219054911.2017362-5-srinivas.neeli@amd.com>

> +#define TSN_EMMC_LINKSPEED_10		0x0	   /* 10 Mbit */

If the MAC cannot do 10Mbps, why have this?

> +static int emac_open(struct net_device *ndev)
> +{
> +	struct tsn_emac *emac = netdev_priv(ndev);
> +	struct phy_device *phydev = NULL;
> +
> +	if (emac->phy_node) {
> +		phydev = of_phy_connect(emac->ndev, emac->phy_node,
> +					tsn_adjust_link_tsn,
> +					emac->phy_flags,
> +					emac->phy_mode);
> +		if (!phydev)
> +			dev_err(emac->common->dev, "of_phy_connect() failed\n");
> +		else
> +			phy_start(phydev);
> +	}

Somewhere around here, i would expect you to tell phylib the MAC
cannot do 10Mbps. You don't want the PHY offering those speeds for
autoneg, otherwise it might actually negotiate 10Mbps.

I also think you should be using phylink, not phylib. But we first
need to finish the discussion about DSA vs pure switchdev. If this
ends up being a DSA driver, you will be using phylink anywhere. If it
is a pure switchdev driver, i would still recommend using phylink, you
are less likely to get things wrong, because the API is better
designed.

    Andrew

  parent reply	other threads:[~2026-02-20 15:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19  5:49 [RFC PATCH 0/8] xilinx: tsn: Add TSN Endpoint Ethernet MAC driver support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 1/8] dt-bindings: net: Add TSN Endpoint Ethernet MAC support Srinivas Neeli
2026-02-19 16:53   ` Andrew Lunn
2026-02-20 13:03     ` Neeli, Srinivas
2026-02-20 13:39       ` Andrew Lunn
2026-02-24 11:08         ` Neeli, Srinivas
2026-02-19  5:49 ` [RFC PATCH 2/8] net: xilinx: tsn: Introduce TSN core driver skeleton Srinivas Neeli
2026-02-19  7:32   ` Krzysztof Kozlowski
2026-02-19  5:49 ` [RFC PATCH 3/8] net: xilinx: tsn: Add TSN endpoint and MCDMA support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 4/8] xilinx: tsn: Add Ethernet MAC (EMAC) and MDIO support to the TSN driver Srinivas Neeli
2026-02-19 17:05   ` Andrew Lunn
2026-02-20 13:08     ` Neeli, Srinivas
2026-02-20 15:03       ` Andrew Lunn
2026-02-24 11:11         ` Neeli, Srinivas
2026-02-20 15:12   ` Andrew Lunn [this message]
2026-02-24 11:15     ` Neeli, Srinivas
2026-02-19  5:49 ` [RFC PATCH 5/8] net: xilinx: tsn: Add TSN switch support with port state and frame filter control Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 6/8] dt-bindings: net: Add PTP interrupt support Srinivas Neeli
2026-02-20 15:17   ` Andrew Lunn
2026-02-19  5:49 ` [RFC PATCH 7/8] net: xilinx: tsn: Add PTP hardware clock (PHC) and timer support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 8/8] net: xilinx: tsn: Add PTP packet transmission support Srinivas Neeli
2026-02-19  7:34 ` [RFC PATCH 0/8] xilinx: tsn: Add TSN Endpoint Ethernet MAC driver support Krzysztof Kozlowski
2026-02-19 16:42 ` Andrew Lunn
2026-02-20 12:59   ` Neeli, Srinivas
2026-02-20 13:36     ` Andrew Lunn
2026-03-05 11:46       ` Neeli, Srinivas
2026-03-26 10:11         ` Neeli, Srinivas

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=39ae9c0f-d832-4771-8177-838995fff4da@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=srinivas.neeli@amd.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