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] [day] [month] [year] [list]
Message-ID: <f2078d1d-071c-f261-c4e9-007915831933@denx.de>
Date:   Thu, 7 Apr 2022 04:07:18 +0200
From:   Marek Vasut <marex@...x.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Oleksij Rempel <linux@...pel-privat.de>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH] net: phy: micrel: ksz9031/ksz9131: add cabletest support

On 4/7/22 03:31, Andrew Lunn wrote:
>> +static int ksz9x31_cable_test_start(struct phy_device *phydev)
>> +{
>> +	int ret;
>> +
>> +	/* KSZ9131RNX, DS00002841B-page 38, 4.14 LinkMD (R) Cable Diagnostic
>> +	 * Prior to running the cable diagnostics, Auto-negotiation should
>> +	 * be disabled, full duplex set and the link speed set to 1000Mbps
>> +	 * via the Basic Control Register.
>> +	 */
>> +	ret = phy_modify(phydev, MII_BMCR,
>> +			 BMCR_SPEED1000 | BMCR_FULLDPLX |
>> +			 BMCR_ANENABLE | BMCR_SPEED100,
>> +			 BMCR_SPEED1000 | BMCR_FULLDPLX);
>> +	if (ret)
>> +		return ret;
>> +
>> +	/* KSZ9131RNX, DS00002841B-page 38, 4.14 LinkMD (R) Cable Diagnostic
>> +	 * The Master-Slave configuration should be set to Slave by writing
>> +	 * a value of 0x1000 to the Auto-Negotiation Master Slave Control
>> +	 * Register.
>> +	 */
>> +	return phy_modify(phydev, MII_CTRL1000,
>> +			  CTL1000_ENABLE_MASTER | CTL1000_AS_MASTER,
>> +			  CTL1000_ENABLE_MASTER);
> 
> Did you check if this gets undone when the cable test is
> completed? The phy state machine will call phy_init_hw(), but i've no
> idea if that is sufficient to reset the master selection.

Ha, I did not, V2 is coming with this fixed.

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ