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]
Date: Thu, 21 Dec 2023 15:45:42 +0100
From: Dimitri Fedrau <dima.fedrau@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Stefan Eichenberger <eichest@...il.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] net: phy: marvell-88q2xxx: add driver for the
 Marvell 88Q2220 PHY

Am Thu, Dec 21, 2023 at 03:25:56PM +0100 schrieb Andrew Lunn:
> > Without setting the master-slave option it didn't work. I think its
> > mandatory.
> 
> I don't think it is. The PHY should have a default setting for
> master-slave. Often its based on the typical use case. If its
> typically inside a switch, then it should default to prefer-master. If
> its typically in an end system, then it should be prefer-slave.
> 
That would be the case if you use a forced configuration. I think this
is already implemented by reading out the MDIO_PMA_PMD_BT1_CTRL in        
genphy_c45_pma_baset1_read_master_slave. Probably the problem arises    
with following lines which prevents an inital read of the configuration:

static int mv88q2xxx_config_init(struct phy_device *phydev)
{
        int ret;
                                                                        
        /* The 88Q2XXX PHYs do have the extended ability register available, but
         * register MDIO_PMA_EXTABLE where they should signalize it does not
         * work according to specification. Therefore, we force it here.
         */
        phydev->pma_extable = MDIO_PMA_EXTABLE_BT1;

        if (phydev->drv->phy_id == MARVELL_PHY_ID_88Q2220)
                return 0;

        /* Read the current PHY configuration */
        ret = genphy_c45_read_pma(phydev);
        if (ret)
                return ret;

        return mv88q2xxx_config_aneg(phydev);
}

If I type in "ethtool -s eth0 autoneg on" I don't have to set the 
master-slave option. Is the assumption here that we always start with a 
forced configuration ? If yes, then I have to fix it.

>     Andrew

	Dimitri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ