lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f33be5e3-cfb4-473f-8669-58e1982d2a17@lunn.ch>
Date: Thu, 13 Jul 2023 17:18:02 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Stefan Eichenberger <eichest@...il.com>
Cc: netdev@...r.kernel.org, hkallweit1@...il.com, linux@...linux.org.uk,
	francesco.dolcini@...adex.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next v2 1/4] net: phy: add the link modes for
 1000BASE-T1 Ethernet PHY

On Thu, Jul 13, 2023 at 04:10:21PM +0200, Stefan Eichenberger wrote:
> Hi Andrew,
> 
> On Mon, Jul 10, 2023 at 11:10:17PM +0200, Andrew Lunn wrote:
> > On Mon, Jul 10, 2023 at 10:58:57PM +0200, Stefan Eichenberger wrote:
> > > This patch adds the link modes for the 1000BASE-T1 Ethernet PHYs. It
> > > supports 100BASE-T1/1000BASE-T1 in full duplex mode. So far I could not
> > > find a 1000BASE-T1 PHY that also supports 10BASE-T1, so this mode is not
> > > added.
> > 
> > Is this actually needed? Ideally you want to extend
> > genphy_c45_pma_read_abilities() to look in the PHY registers and
> > determine what the PHY can do. You should only use .features if it is
> > impossible to determine the PHY abilities by reading registers.
> 
> Unfortunately the MDIO_PMA_EXTABLE register does not work on this PHY.
> It will not signalize that it is BT1 capable (MDIO_PMA_EXTABLE_BT1). I
> tested it again (should be 0x0800):

**
 * genphy_c45_baset1_able - checks if the PMA has BASE-T1 extended abilities
 * @phydev: target phy_device struct
 */
static bool genphy_c45_baset1_able(struct phy_device *phydev)
{
        int val;

        if (phydev->pma_extable == -ENODATA) {
                val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_EXTABLE);
                if (val < 0)
                        return false;

                phydev->pma_extable = val;
        }

        return !!(phydev->pma_extable & MDIO_PMA_EXTABLE_BT1);
}

This is rather odd, but might help you. You already have a workaround
in mv88q2xxx_config_init(). Have you tried adding a get_features()
callback with sets phydev->pma_extable to the correct value, and then
calls genphy_c45_pma_read_abilities()?

Please also report the bug in the PHY to Marvell. Maybe a later
revision might have it fixed.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ