mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 1/3] net: phy: micrel: add MDI/MDI-X control support for KSZ9477 switch-integrated PHYs
Date: Tue, 10 Jun 2025 14:46:11 +0200	[thread overview]
Message-ID: <aEgpE7dZNT_GqhSV@pengutronix.de> (raw)
In-Reply-To: <6597c2fd-077a-4eac-945f-97b43c130418@lunn.ch>

On Tue, Jun 10, 2025 at 02:31:45PM +0200, Andrew Lunn wrote:
> On Tue, Jun 10, 2025 at 11:13:52AM +0200, Oleksij Rempel wrote:
> > Add MDI/MDI-X configuration support for PHYs integrated in the KSZ9477
> > family of Ethernet switches.
> > 
> > All MDI/MDI-X configuration modes are supported:
> >   - Automatic MDI/MDI-X (ETH_TP_MDI_AUTO)
> >   - Forced MDI (ETH_TP_MDI)
> >   - Forced MDI-X (ETH_TP_MDI_X)
> > 
> > However, when operating in automatic mode, the PHY does not expose the
> > resolved crossover status (i.e., whether MDI or MDI-X is active).
> > Therefore, in auto mode, the driver reports ETH_TP_MDI_INVALID as
> > the current status.
> 
> I assume you also considered returning ETH_TP_MDI_AUTO? What makes
> INVALID better than AUTO?

The phydev->mdix_ctrl returns configuration state, which cant be set to
ETH_TP_MDI_AUTO.
The phydev->mdix should return actual crossover state, which is
ETH_TP_MDI or ETH_TP_MDI_X. Setting it to ETH_TP_MDI_AUTO, would not
provide any usable information.

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

  reply	other threads:[~2025-06-10 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10  9:13 [PATCH net-next v1 0/3] net: phy: micrel: add extended PHY support for KSZ9477-class devices Oleksij Rempel
2025-06-10  9:13 ` [PATCH net-next v1 1/3] net: phy: micrel: add MDI/MDI-X control support for KSZ9477 switch-integrated PHYs Oleksij Rempel
2025-06-10 12:31   ` Andrew Lunn
2025-06-10 12:46     ` Oleksij Rempel [this message]
2025-06-10 13:12       ` Andrew Lunn
2025-06-10  9:13 ` [PATCH net-next v1 2/3] net: phy: micrel: Add RX error counter " Oleksij Rempel
2025-06-10 12:36   ` Andrew Lunn
2025-06-10  9:13 ` [PATCH net-next v1 3/3] net: phy: micrel: add cable test support for KSZ9477-class PHYs Oleksij Rempel
2025-06-10 12:38   ` Andrew Lunn
2025-06-12  0:40 ` [PATCH net-next v1 0/3] net: phy: micrel: add extended PHY support for KSZ9477-class devices 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=aEgpE7dZNT_GqhSV@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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®