public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew@lunn.ch>,
	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>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michael Dege <michael.dege@renesas.com>,
	Christian Mardmoeller <christian.mardmoeller@renesas.com>,
	Dennis Ostermann <dennis.ostermann@renesas.com>
Subject: Re: [PATCH] net: phy: phy_ethtool_ksettings_set: Allow any supported speed
Date: Mon, 2 Dec 2024 16:03:11 +0000	[thread overview]
Message-ID: <Z03aPw_QgVYn8WyR@shell.armlinux.org.uk> (raw)
In-Reply-To: <5cef26d0-b24f-48c6-a5e0-f7c9bd0cefec@cogentembedded.com>

On Mon, Dec 02, 2024 at 08:51:44PM +0500, Nikita Yushchenko wrote:
> > > root@vc4-033:~# ethtool tsn0
> > > Settings for tsn0:
> > >          Supported ports: [ MII ]
> > >          Supported link modes:   2500baseT/Full
> > >          Supported pause frame use: Symmetric Receive-only
> > >          Supports auto-negotiation: No
> > 
> > Okay, the PHY can apparently only operate in fixed mode, although I
> > would suggest checking that is actually the case. I suspect that may
> > be a driver bug, especially as...
> 
> My contacts from Renesas say that this PHY chip is an engineering sample.
> 
> I'm not sure about the origin of "driver" for this. I did not look inside
> before, but now I did, and it is almost completely a stub. Even no init
> sequence. The only hw operations that this stub does are
> (1) reading bit 0 of register 1.0901 and returning it as link status (phydev->link),
> (2) reading bit 0 of register 1.0000 and returning it as master/slave
> setting (phydev->master_slave_get / phydev->master_slave_state)
> (3) applying phydev->master_slave_set via writing to bit 0 of register
> 1.0000 and then writing 0x200 to register 7.0200
> 
> Per standard, writing 0x200 to 7.0200 is autoneg restart, however bit 0 of
> 1.0000 has nothing to do with master/slave. So what device actually does is
> unclear. Just a black box that provides 2.5G Base-T1 signalling, and
> software-wise can only report link and accept master-slave configuration.
> 
> Not sure if supporting this sort of black box worths kernel changes.
> 
> 
> > it changes phydev->duplex, which is _not_ supposed to happen if
> > negotiation has been disabled.
> 
> There are no writes to phydev->duplex inside the "driver".
> Something in the phy core is changing it.

Maybe it's calling phylib functions? Shrug, I'm losing interest in this
problem without seeing the driver code. There's just too much unknown
here.

It's not so much about what the driver does with the hardware. We have
some T1 library functions. We don't know which are being used (if any).

Phylib won't randomly change phydev->duplex unless a library function
that e.g. reads status from the PHY does it.

As I say, need to see the code. Otherwise... sorry, I'm no longer
interested in your problem.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2024-12-02 16:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02  8:33 [PATCH] net: phy: phy_ethtool_ksettings_set: Allow any supported speed Nikita Yushchenko
2024-12-02  9:03 ` Maxime Chevallier
2024-12-02  9:20   ` Nikita Yushchenko
2024-12-02  9:59     ` Maxime Chevallier
2024-12-02 10:10     ` Russell King (Oracle)
2024-12-02 10:17       ` Nikita Yushchenko
2024-12-02 10:23         ` Russell King (Oracle)
2024-12-02 11:09           ` Nikita Yushchenko
2024-12-02 12:30             ` Russell King (Oracle)
2024-12-02 15:51               ` Nikita Yushchenko
2024-12-02 16:03                 ` Russell King (Oracle) [this message]
2024-12-03 11:01                   ` Nikita Yushchenko
2024-12-03 15:15                     ` Russell King (Oracle)
2024-12-03 14:05                   ` Dennis Ostermann
2024-12-03 14:45                     ` Andrew Lunn
2024-12-03 15:21                       ` Russell King (Oracle)
2024-12-03 15:51                         ` Maxime Chevallier
2024-12-03 16:37                           ` Russell King (Oracle)
2024-12-02 14:32             ` Andrew Lunn
2024-12-02 10:03 ` Russell King (Oracle)
2024-12-03 14:02   ` Nikita Yushchenko

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=Z03aPw_QgVYn8WyR@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=christian.mardmoeller@renesas.com \
    --cc=davem@davemloft.net \
    --cc=dennis.ostermann@renesas.com \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=michael.dege@renesas.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --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