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: <m3oa1e2zf7.fsf@t19.piap.pl>
Date:   Thu, 17 Nov 2016 11:06:36 +0100
From:   khalasa@...p.pl (Krzysztof HaƂasa)
To:     linux-kernel@...r.kernel.org
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH 01/15] net: phy: Add phy_ethtool_nway_reset

Hi,

Florian Fainelli <f.fainelli@...il.com> writes:

> This function just calls into genphy_restart_aneg() to perform an
> autonegotation restart.
>
> +int phy_ethtool_nway_reset(struct net_device *ndev)
> +{
> +	struct phy_device *phydev = ndev->phydev;
> +
> +	if (!phydev)
> +		return -ENODEV;
> +
> +	return genphy_restart_aneg(phydev);
> +}

and then you're using this function as .nway_reset of all netdev drivers
in question.

genphy_restart_aneg() deals directly with MII BMCR register:

int genphy_restart_aneg(struct phy_device *phydev)
{
        int ctl = phy_read(phydev, MII_BMCR);

        if (ctl < 0)
                return ctl;

        ctl |= BMCR_ANENABLE | BMCR_ANRESTART;

        /* Don't isolate the PHY if we're negotiating */
        ctl &= ~BMCR_ISOLATE;

        return phy_write(phydev, MII_BMCR, ctl);
}

Will the above work if the PHY is something special, e.g. a "fixed"
connection, or some kind of fiber trx etc? Normally, the PHY driver
could provide its own config_aneg().
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ